summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* QNetworkRequest: Document how Qt handles 301 and 302 status codesMårten Nordheim2022-01-181-0/+5
| | | | | | | | | To make it explicit Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-92909 Change-Id: I8f8dc99628168a566158acef72ae2a5e001eef88 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Convert date-time to UTC before claiming it's in GMTEdward Welbourne2022-01-171-4/+4
| | | | | | | | | | | | | | | | | | QNetworkHeadersPrivate::toHttpDate() used a custom format to output a date-time; the format supplied GMT as suffix, but neglected to convert the date-time to UTC, so local-time was formatted as if it were UTC, regardless of its actual offset from it. Fixing this (by the obvious toUTC() call) broke formatting when the supplied header value was a QDate, since it's packaged as a QVariant and QVariant's conversion of QDate to QDateTime uses local time's (not UTC's) start of day. So fix headerValue() to separate QDate and QDateTime cases and use startOfDay(Qt::UTC) to get the right start of the day. Added tests for non-UTC date-times appearing correctly in HTTP headers. Fixes: QTBUG-80666 Pick-to: 6.3 6.2 6.2.3 5.15 Change-Id: I2792bce14a07be025cf551b0594630260c112269 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: Include moc filesMårten Nordheim2022-01-1515-0/+30
| | | | | Change-Id: I227a9541bf76c1c048a694f022b8fc419c0c2544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QHttpNetworkConnection: Always set proxy settings to all channelsAndrey Mozzhuhin2022-01-121-2/+2
| | | | | | | | | | | | | | Proxy settings should always be set to all channels because after switching from HTTP/2 to HTTP/1.1 they may all be used. Problem was made in commit 8b9d246225dcd63900399297b0fd553918840bea. It is introduce the QHttpNetworkConnectionPrivate::activeChannel field, which value is 1 got HTTP/2 by default, but can later be changed to 6 if the remote host doesn't support HTTP/2. Pick-to: 6.3 6.2 5.15 Change-Id: Idcdeb22ec806520965f30a22045f99aa009a7362 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Q_{APPLICATION,GLOBAL}_STATIC: use variadic macrosThiago Macieira2021-12-171-3/+3
| | | | | | | | | | | | | | | | | We can't remove Q_GLOBAL_STATIC_WITH_ARGS, for compatibility reasons. It's also the only way to pass uniform initialization (i.e., initialize the value as value{with_braces}), though I don't think this is used almost anywhere due to the fact that you couldn't pass more than one argument. But Q_APPLICATION_STATIC is new in 6.3, so we have time to change it. [ChangeLog][QtCore][QGlobalStatic] The Q_GLOBAL_STATIC macro is now variadic. Any extra arguments are used as constructor arguments, obliterating the need to use Q_GLOBAL_STATIC_WITH_ARGS(). Pick-to: 6.3 Change-Id: Ib42b3adc93bf4d43bd55fffd16be3656a512fe53 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QNetworkAccessBackend: Fix living QObjects after QCoreApplication shutdownMike Achtelik2021-12-132-3/+8
| | | | | | | | | | | Since switching to the plugin bases system for the network backends, Qt again retains some QObjects after QCoreApplication shutdown. This was previously fixed in QTBUG-84234, so make sure we destroy the newly introduced QObjects as well. Task-number: QTBUG-84234 Change-Id: Ibb411c2dfb716b8f2aea2a3e366253fbd9dd8f64 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNAM: Reintroduce h2c with an attributeMårten Nordheim2021-12-045-5/+26
| | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkRequest] Added QNetworkRequest::Http2CleartextAllowedAttribute which controls whether HTTP/2 cleartext (h2c) is allowed or not. The default is false. This replaces the QT_NETWORK_H2C_ALLOWED environment variable. Task-number: QTBUG-98642 Change-Id: I43ae1cc671788f6d2559cd316f6667b412c8e75e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNAM: Disable h2c by defaultMårten Nordheim2021-11-303-0/+19
| | | | | | | | | | | | | | | | | | And since it's relatively unlikely to be used, just leave it behind a environment variable for now. [ChangeLog][QtNetwork][Potentially Source-Incompatible] Support for clear-text http/2 was disabled due to incompatibility with certain servers. If you were relying on this feature you must re-enable it by setting the QT_NETWORK_ALLOW_H2C environment variable. For a later version of Qt it will get a dedicated attribute. Pick-to: 6.2 Task-number: QTBUG-98642 Change-Id: Id3e360726e285b3128e3e3f4bce9440404c9ad6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add more verification when parsing http headers and add testsØystein Heskestad2021-11-191-23/+61
| | | | | | | | Adding tests from QtWebSockets that will reuse QHttpHeaderParser Task-number: QTBUG-80700 Change-Id: I76294a9156173314a3cf09160d0ca4e0d7c6ef3a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: fix network reply status attributeLorn Potter2021-11-061-6/+11
| | | | | | | | | | We were emitting the finished signal before the status code attributes were being set. Fixes: QTBUG-97984 Pick-to: 6.2 5.15 Change-Id: Ib179898dee2b9667d482348ad12180e8bdef74db Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QNetworkAccessAuthenticationManager: don't mix iterators and pointersGiuseppe D'Angelo2021-10-141-8/+11
| | | | | | | | | | | QList::iterator is not a pointer and shouldn't be treated as one. Convert the code to use iterators consistently (using iterators is necessary due to the call to insert()). Change-Id: I917b3ff6fdcf1f7959e35ac5b091a8140e9f833c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't send the default SETTINGS_INITIAL_WINDOW_SIZETimur Pocheptsov2021-10-123-13/+14
| | | | | | | | | | And don't set non-default large value in QNetworkRequest's constructor. Some servers consider those values as 'flow control error'. Pick-to: 6.2 Fixes: QTBUG-97384 Change-Id: I801b7c83fe7e7392a02ba653c36dfa8a22c21d1e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* network: Fix typos in source code commentsJonas Kvinge2021-10-124-8/+8
| | | | | | Change-Id: Iff505451e3f00de2d753de0f1d891a73cf73ef0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* network: Fix typos in messagesJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ibad852372c80a988efeabc2b0757bf238b92b9a3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* network: Fix typos in documentationJonas Kvinge2021-10-122-2/+2
| | | | | | | Pick-to: 5.15 6.2 Change-Id: I386c6e4a21dacb2553a39a073052dcf6d92a9854 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Http/2 - handle PADDED flag correctlyTimur Pocheptsov2021-10-091-2/+3
| | | | | | | | | | | | Previously, when deciding where the actual data is, Frame was calling padding() to test if offset is needed. A curious case with a DATA frame containing compressed body and having 'PADDED' flag set with a padding equal to ... 0, ended in a decompression error (and assert in 6.2 code). Pick-to: 6.2 5.15 Fixes: QTBUG-97179 Change-Id: I9341a4d68510aa4c26f4972afdcd09a530d5a367 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move QNAM's http header parsing into separate classØystein Heskestad2021-09-0910-131/+417
| | | | | | Fixes: QTBUG-80701 Change-Id: I43f5e102c15d121dba74e07e3cd4bb8aded1c763 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Fix documentation warnings for Qt NetworkTopi Reinio2021-09-081-3/+3
| | | | | | | | | | | | | | | | The Clang compiler used in QDoc complained about the documentation- specific overload of QAbstractSocket::bind(): error: incomplete type 'QHostAddress' named in nested name specifier Also, fix an attempted snippet inclusion to use the \include command, and fix the comment tag spacing and indentation. Pick-to: 6.2 Fixes: QTBUG-96293 Change-Id: Ie4d78933fa7ac0aaf7f3bcc6487e7fd823db5123 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Remove QNetworkAccessCache::Node's explicit ctorMårten Nordheim2021-09-071-8/+4
| | | | | Change-Id: I2a993bcf96a0c603496e8a420251a7e01f46acee Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* wasm: fix network data URI schemeLorn Potter2021-09-071-2/+0
| | | | | | | | | | Inadvertantly ifdefed out. Tested and works fine Fixes: QTBUG-96170 Pick-to: 6.2 5.15 Change-Id: Ib26cf76a548146d4212c48b228965348038f34e8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QNetworkAccessCache: Style fixes and move assertsMårten Nordheim2021-09-021-6/+4
| | | | | Change-Id: I300d2525d9987737697e2cc6a326be19554902c8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Port to QDeadlineTimerMårten Nordheim2021-09-021-13/+11
| | | | | | | | | QDeadlineTimer is semantically more correct than comparing timestamps to 'now'. Change-Id: I15d9654af2886499392e6409d22f802203aca18d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkAccessCache: move debug logging to specific ifdefMårten Nordheim2021-09-021-1/+3
| | | | | | | | | | | | Instead of for any debug output. Since QTestLib cuts off output after X messages we shouldn't add these by default. Another option would be categorized logging, but QNAC should not be very interesting for 'outside' users Change-Id: I4c2c2a68ca4962476bfecd679f3229ccf3403aee Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Remove the ctor and init member variables in classMårten Nordheim2021-09-022-8/+2
| | | | | | Change-Id: Ic7ce41679d89b496413ef13e6e917bf506b2405d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkAccessCache: Rename first and last nodeMårten Nordheim2021-09-022-64/+68
| | | | | | | | | | | | | 'oldest' and 'newest' to me make me thing of 'least recently inserted' and 'most recently inserted', which is what they used to mean. But now the expiration can be set per-request so the semantics don't work anymore. So, rename to 'nextExpiringNode' and 'lastExpiringNode'. Also rename the node member elements "older" and "newer" to the more generic "previous" and "next". Change-Id: I582267d09c60c68396e4201e4a20185bbf0942e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix documentation of QNetworkAccessBackendMårten Nordheim2021-09-011-0/+111
| | | | | | | | | | | | | | | | | | | The classes themselves were not documented, so...: Add some documentation for QNetworkAccessBackendFactory. Add some overall class docs for QNetworkAccessBackend. The class docs were marked \internal (because they mostly are). I don't think we yet have a defined way to handle semi-private APIs but having them be marked \internal and leaving the documentation in source seems fine (and was what someone suggested a while back). Add documentation for pure virtual functions which were overlooked. Pick-to: 6.2 Fixes: QTBUG-88774 Change-Id: Id7fe18ec92372abb96540cd29543608f87ec862e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Another fix to the linked list insertionMårten Nordheim2021-08-311-0/+2
| | | | | | | | | When inserting between two nodes the "previous" node's "newer" was forgotten and not updated. So every node's "newer" would point to the "newest" node. Change-Id: I5b0df8812be5f7f62b3ae363e4c78f582e0e5c43 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessCache: Remove unused codeMårten Nordheim2021-08-272-42/+0
| | | | | | | | The function was never called. As a consequence receiverQueue was only ever read and never written. Change-Id: I30905446452d9f263124d3af08c42e2e1b0cafbe Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkCookie: Clean upMårten Nordheim2021-08-271-8/+8
| | | | | | | | | | | | | Rewrite the regex to not capture the things we ignore anyway. Use capturedView to avoid allocating a string just to turn it into an int. Fix a (usually) ifdef-ed out piece of code that was still calling a QRegExp function. Make the QRegularExpression static const to save it from having to recompile every time. Change-Id: I2f4841a2bc35df4e6cea44aec72432410583f770 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkCookie: Fix use-after-freeMårten Nordheim2021-08-261-3/+4
| | | | | | | | | | | | The code was previously calling indexOf() on a temporary, which QRegularExpression would create backing storage for. After 11d1dcc6e263c5059f34b44d531c9ccdf7c0b1d6 the internals were made to use the QStringView path, which inadvertently meant that there was no storage for the temporary string anymore. So we need to keep it alive ourselves. Change-Id: I542da7010934594eba3b93261322963866ed9297 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: don’t dereference null reply pointerMorten Johan Sørvig2021-08-261-40/+33
| | | | | | | | | | | | | | | | | | | Move all access to the reply inside the nullptr check, while making sure to still call emscripten_fetch_close() unconditionally where needed. Make all four Emscripten callback handlers have a similar structure where we check if the reply is not null and not in the Aborted state. (This removes one emscripten_fetch_t nullptr check in stateChage(), if it is really the case that Emscripten calls us with a null emscripten_fetch_t then we should add it back.) Pick-to: 5.15 6.1 6.2 Change-Id: Iadcbe6338c338cfeb8967490e0951d8b3e1ec5b3 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* NetworkAccessBackend: Remove the backend part of the nameMårten Nordheim2021-08-261-1/+1
| | | | | | | | | | | | | | For consistency with naming of other plugins. Slight compatibility break, but this is semi-private API. [ChangeLog][Network][QNetworkAccessBackend] The NetworkAccessBackend plugin-type is renamed to NetworkAccess, if you have a plugin marked NetworkAccessBackend you need to change it to NetworkAccess. Pick-to: 6.2 Change-Id: Ib5ea02f542254b0f5b8c425c89ee00075a58c956 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessManager: move #ifery out of if-conditionMårten Nordheim2021-08-261-4/+8
| | | | | | | for legibility Change-Id: Id5bc2471e79bb8560cec46068cc72573f6adec34 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNetworkAccessBackend: emit readyRead less oftenMårten Nordheim2021-08-261-1/+4
| | | | | | | | | Once per iteration of the loop wouldn't theoretically be so bad if there was no overhead to emitting signals or reading from buffers. Change-Id: I0e424264fcc95eb2e2e5f8f908cf9ae3a7cc4b7e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix inserting node entry in QNetworkAccessCache::linkEntryJonas Kvinge2021-08-241-0/+1
| | | | | | | | | | When the new entry has the same, or older timestamp than the newest, it's linked behind the newest entry, but "newest" for the new node currently isn't assigned to the newer entry. Fixes: QTBUG-95950 Change-Id: I7ef5f1ce5a9479ce47839c8f1a6011124d3f43de Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: fix unused variable warning/errorMorten Johan Sørvig2021-08-191-1/+1
| | | | | Change-Id: If6dabc94f6d64695a0b28e73061274f8ea1c4ed6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QDecompressHelper: Skip double-decompression if download is smallMårten Nordheim2021-08-042-18/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To retain backwards compatibility with some QNetworkReply usage, namely connecting solely to finished-signal and allocating a buffer to read into, but without storing the entire decompressed file in memory until read, we may decompress the file twice. With this patch users can now avoid this double decompression if the amount of buffered data stays below 10 MiB. This means any file smaller than 10 MiB will never need to be decompressed twice to know the size of it. On top of that, if the data is handled as it arrives (e.g. in readyRead) and the buffer is kept below 10 MiB it won't need to decompress twice either. This is active as long as "countDecompressed" is true, though it currently always is in QNetworkAccessManger, with a future goal to make it possible to control with public API. Since it requires the user to potentially adapt their usage of QNetworkReply. In this patch we also stop tracking the amount of unhandled uncompressed bytes (uncompressedBytes) in favor of tracking the total amount of bytes which has been read() by the user of QDecompressHelper (totalBytesRead), since we can more intuitively work out the total amount of unread bytes using this value. Change-Id: Ie3d8d6e39a18343fcf9b610f45c7fe7e4cd4e474 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QDirIterator: add nextFileInfo()Marc Mutz2021-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Before this change, next() was the only way to advance the iterator, whether the caller was ultimately interested in just the filePath() (good) or not (bad luck, had to call .fileInfo()). Add a new function, nextFileInfo(), with returns fileInfo() instead. Incidentally, the returned object has already been constructed as part of advance()ing the iterator, so the new function is faster than next() even if the result is ignored, because we're not calculating a QString result the caller may not be interested in. Use the new function around the code. Fix a couple of cases of next(); fileInfo().filePath() (just use next()'s return value) as a drive-by. [ChangeLog][QtCore][QDirIterator] Added nextFileInfo(), which is like next(), but returns fileInfo() instead of filePath(). Change-Id: I601220575961169b44139fc55b9eae6c3197afb4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkReply: hold QAtomicInt in shared_ptr, not QSharedPointerMarc Mutz2021-07-285-11/+11
| | | | | | | | | | | | Ditto QNetworkAccessAuthenticationManager. QSharedPointer performs twice as many atomic operations per pointer copy as std::shared_ptr, and this is private API, we're not bound by BC constraints, so we can port to the more efficient version. Change-Id: I59dc09ff4eb3b4acf5d7a68695752a9a7110d8d3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNAM: Allow to configure when connections to a host are torn downMarkus Goetz2021-07-277-14/+62
| | | | | | | | | | | | This introduces a new attribute that allows behavior to keep the TCP connection(s) to a HTTP1/HTTP2 host longer or shorter than the default of 120 seconds. Note that the server might still close the connection earlier. Fixes: QTBUG-20726 Fixes: QTBUG-91440 Change-Id: I7da64230a78c642c12c0ddbe6b678cf17c3aafde Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkReply: Add two new signalsMarkus Goetz2021-07-2011-0/+54
| | | | | | | | | | | These signals allow monitoring where in the HTTP1/HTTP2 flow a request is currently in. Fixes: QTBUG-71698 Fixes: QTBUG-18766 Change-Id: Icc2fe435afc9f680fa7a76c32731e25fcdfeb4b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkDiskCache: Fix tracking of size during storeItem()Mårten Nordheim2021-07-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | If the file already existed we simply removed the old one without adjusting the size. So use the removeFile() function which takes care of that. Additionally, if the current size was non-null we previously increased the size (presumably meant to be temporarily but wasn't) and called expire() which would either: 1. not do anything and return currentCacheSize, if it was not greater than the max size. This would mean that the size of the file would be counted twice. or, 2. discard currentCacheSize, measure the size of the items, and then remove some items if the total size surpassed the max cache size Neither of those branches need us to (temporarily) increase currentCacheSize. It also doesn't attain the (presumed) goal of trying to keep below the max cache size after having added the new item. Fixes: QTBUG-95009 Pick-to: 6.2 6.1 5.15 Change-Id: I2b5b13ff473a7aa8169cf2aecfea783c97f2d09a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* H2: emit encrypted for at least the first reply, similar to H1Timur Pocheptsov2021-07-201-0/+4
| | | | | | | Pick-to: 6.2 6.1 5.15 Fixes: QTBUG-95277 Change-Id: I1fe01503376c0d6278e366d7bd31b412b7cc3a69 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Hold QSslContext in shared_ptrMarc Mutz2021-07-182-5/+5
| | | | | | | | | | | ... instead of QSharedPointer. QSharedPointer performs twice as many atomic operations per pointer copy as std::shared_ptr, and this is private API, we're not bound by BC constraints, so we can port to the more efficient version. Change-Id: I2e2a02493565a7ca51c86ec0ed66b6ce7c763e41 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* SSL: port QSharedPointer<QSslContext> uses to std-compatible API subsetMarc Mutz2021-07-161-6/+5
| | | | | | | | | | | In preparation of porting to shared_ptr. Add a few strategic moves and remove a rather pointless comment stating the obvious. Change-Id: Ie1c0f3431af79bdb204e00d99323bf9f2d100d0d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Export QHttpNetworkReply private to permit it to be used by websocketsØystein Heskestad2021-07-161-2/+2
| | | | | | | Task-number: QTBUG-80700 Change-Id: Ifec9c89a2cde5cae1ab98d95b43de21e5b4531fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Hold QRingBuffer and QNonContiguousByteDevice in shared_ptrMarc Mutz2021-07-147-17/+23
| | | | | | | | | | | | ... instead of QSharedPointer. QSharedPointer performs twice as many atomic operations per pointer copy as std::shared_ptr, and this is private API, we're not bound by BC constraints, so we can port to the more efficient version. Change-Id: I9572a8321aae381e5dbe4a51119f2c9494a8fbc7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Fix decompression safety-check threshold docsMårten Nordheim2021-07-131-2/+2
| | | | | | | | | | The \sa was neglected Amends d33040548ff727a040ea66174cbd838e883fed56 Pick-to: 6.2 Change-Id: Ib298ac3390819f9ea4092a1f2bf470ea82c9e4fe Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Use QCryptographicHash::hash() more widelyMarc Mutz2021-07-071-3/+2
| | | | | | | | | | ... instead of the "usual" rule of three: ctor, addData(), result(). Not only does it generate less code in the caller, it's now also faster. Change-Id: I67c7eeb01f527b90e80a08f60c1c7f2ec1e49dd4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNetworkRequest: Rename (set)minimumArchiveBombSizeMårten Nordheim2021-07-025-17/+18
| | | | | | | | | To (set)decompressedSafetyCheckThreshold, as suggested on the API review. Task-number: QTBUG-94407 Change-Id: Iffc52691022939ae46703de8a0416355487b716f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>