summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused .qrc filesJoerg Bornemann2022-01-171-5/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Convert date-time to UTC before claiming it's in GMTEdward Welbourne2022-01-171-8/+26
| | | | | | | | | | | | | | | | | | 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>
* QNAM: Reintroduce h2c with an attributeMårten Nordheim2021-12-041-1/+81
| | | | | | | | | | | [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-301-0/+1
| | | | | | | | | | | | | | | | | | 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-0/+74
| | | | | | | | Adding tests from QtWebSockets that will reuse QHttpHeaderParser Task-number: QTBUG-80700 Change-Id: I76294a9156173314a3cf09160d0ca4e0d7c6ef3a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Http/2 - handle PADDED flag correctlyTimur Pocheptsov2021-10-091-0/+84
| | | | | | | | | | | | 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>
* Silence compiler warning from int/size_t mismatchVolker Hilsheimer2021-10-071-1/+1
| | | | | | | Amends 4757b93b0ef149a3564582a45589f731755c4236. Change-Id: I678785cd61dbdecb3b1e7e68c7daf9f18cad4d02 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Compile autotests for IntegrityTatiana Borisova2021-09-201-0/+6
| | | | | | | | | - process environment/DNS are OFF for INTEGRITY Task-number: QTBUG-96176 Pick-to: 6.2 Change-Id: I189a97f88c96a428586c31a66b8d250e04482900 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_http2: Fix flaky authentication testMårten Nordheim2021-09-101-0/+5
| | | | | | | | | | | The h2 server is running in a separate thread, so while the previous test was finished and the server was deleted, it could still emit and have a queued emission in-flight which would be picked up by the next running test. Pick-to: 6.2 6.1 5.15 Change-Id: I26b1bc711df7473032d6078f35f8aca37c40137e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move QNAM's http header parsing into separate classØystein Heskestad2021-09-091-1/+1
| | | | | | Fixes: QTBUG-80701 Change-Id: I43f5e102c15d121dba74e07e3cd4bb8aded1c763 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_QNetworkReply: Remove and suppress one debug messageMårten Nordheim2021-09-011-1/+4
| | | | | | | | | There's not much context to the URLs being printed, so remove the message. And suppress the message coming from the MiniHttpServer Change-Id: Ie2025ac717657ed0f2f0163bd0af22e12a49b30f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Test QNetworkAccessCache insertions with varying expiry timesMårten Nordheim2021-09-011-0/+106
| | | | | | | | | The insertions are sorted by when they expire. So, we test the various orders to insert entries. Fixes: QTBUG-95959 Change-Id: I1e8d7f4c77dce5eae3d4bfa5101f296c3eea1961 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tests: Use QT_TESTCASE_SOURCEDIR defineIevgenii Meshcheriakov2021-08-112-4/+2
| | | | | | | | | Replace custom SRCDIR define with QT_TESTCASE_SOURCEDIR. The latter is automatically available to all tests to use and serves the same purpose but is not terminated by a slash. Change-Id: I62896d0fd84ac63ac1b74a459ec1646c6bde0a46 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDecompressHelper: Skip double-decompression if download is smallMårten Nordheim2021-08-041-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* QNAM: Allow to configure when connections to a host are torn downMarkus Goetz2021-07-271-0/+52
| | | | | | | | | | | | 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>
* QLocalSocket/Win: do not close the device on disconnectFromServer()Alex Trotsenko2021-07-241-4/+0
| | | | | | | | | | | | | It's the user's privilege to do so when they want to finish reading the QIODevice. Moreover, this is the only difference between close() and disconnectFromServer(). [ChangeLog][QtNetwork][Important Behavior Changes] The Windows implementation of QLocalSocket::disconnectFromServer() no longer calls close(), which is consistent with the behavior on Unix. Change-Id: Ie9ce20c60259a2b08f5254b719355bd7be9b17cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QNetworkReply: Add two new signalsMarkus Goetz2021-07-202-0/+129
| | | | | | | | | | | 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-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/+9
| | | | | | | Pick-to: 6.2 6.1 5.15 Fixes: QTBUG-95277 Change-Id: I1fe01503376c0d6278e366d7bd31b412b7cc3a69 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Rename (set)minimumArchiveBombSizeMårten Nordheim2021-07-022-4/+4
| | | | | | | | | 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>
* tst_http2: use the supportedFeatures() instead of macrosTimur Pocheptsov2021-06-241-10/+14
| | | | | | | | | | | With the recent change, 'system' headers gone: not in the test code anymore, so, for example OPENSSL_VERSION_NUMBER is undefined, making the test to select a wrong code-path - 'h2c', instead of encrypted h2. Pick-to: 6.2 Pick-to: 6.1 Change-Id: I3b201e21fac56875c9045c7463e2ae69af4c6470 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix compiler warning from unused parameterVolker Hilsheimer2021-06-231-1/+1
| | | | | Change-Id: I227b7188eddbad024dcced908c894925cee56591 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Prefer QFAIL("Informative message") over QVERIFY(false)Edward Welbourne2021-06-141-3/+2
| | | | | Change-Id: I706b0aedfa870452331a8c2c488d55b279ee452a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkReply: Decompress when readingMårten Nordheim2021-06-125-3/+1515
| | | | | | | | | | | Rather than when the data is received. Source compatibility is achieved through double-decompressing the data. This lets us know how many bytes are available just as before but without having the uncompressed data left in memory. Fixes: QTBUG-83269 Change-Id: I352bd09581614c582e4628243e2a0e895ba4946b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_QNetworkReply::ignoreSslErrorsList, use the right errorTimur Pocheptsov2021-06-081-10/+8
| | | | | | | | The error that the actual runtime will encounter, and not the one that compile-time ifdefs will (potentially) erroneously select. Change-Id: I8ef4c34bcb8b3e568bc39f8c8ea6bfb7732f9e27 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Add API to set a minimum archive bomb sizeMårten Nordheim2021-05-312-4/+3
| | | | | | Fixes: QTBUG-91870 Change-Id: Ia23e8b8bcfdf65a91fe57e739242a355c681c9e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix auto-tests that are fooled by the presence of more than one pluginTimur Pocheptsov2021-05-271-75/+74
| | | | | | | | | | | | | | | It's possible that Qt is built with OpenSSL and some other backend. The ifdefs generated are not mutually exclusive anymore, as it was in the past. So tests should rely on the actual backend they have working at runtime. In the process of fixing the auto-tests, modernized feature #if-ery and some associated compilation issues. Fixes: QTBUG-92875 Change-Id: I2be1b924d506fd36dc4e2c6c9158b5023ff87f32 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_QDecompressHelper: Move pointer size check inside the testMårten Nordheim2021-05-211-4/+4
| | | | | | | | For some reason the test case was (no longer?) detected by moc Change-Id: I20f20de76479f7d9db43fae985cefe0869a7e203 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix BASE argument of qt_add_resourcesJoerg Bornemann2021-05-181-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BASE argument of qt_add_resources now denotes the root point of the alias of the file. Before, BASE was merely prepended to every file that got passed to qt_add_resources. Old behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "images/button.png") Alias is "../shared/images/button.png", and pro2cmake generated QT_RESOURCE_ALIAS assignments to fix this. New behavior: qt_add_resources(app "images" PREFIX "/" BASE "../shared" FILES "../shared/images/button.png") The alias is "images/button.png". No extra QT_RESOURCE_ALIAS assignment is needed. The new behavior is in effect for user projects and for Qt repositories that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Qt repositories will be ported one by one to this new behavior. Then the old code path can be removed. Pick-to: 6.1 Task-number: QTBUG-86726 Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Blacklist tst_qnetworkreply::ioHttpRedirectMultipartPost on LinuxAllan Sandfeld Jensen2021-05-121-2/+1
| | | | | | | | | | Already blacklisted on the other linux versions, but is failing on SLES now in 5.15 Pick-to: 6.1 5.15 Change-Id: I267908adf94ede51e5520aa2cb806b394fb0438e Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Blacklist and skip failing tests on macOS ARMTor Arne Vestbø2021-05-041-0/+2
| | | | | | Task-number: QTQAINFRA-4431 Change-Id: I4ae47bb461634d524995077501b54322f6beccf3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Let the h2 test server both send and receive DATA framesMårten Nordheim2021-04-302-6/+17
| | | | | | | | | And use this in the authenticationRequired test. Pick-to: 6.1 6.0 5.15 Change-Id: I18e991eb67168214c2c4f829afaca5018568e989 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* HTTP/2 authentication requiredMårten Nordheim2021-04-293-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | With Qt 6 we made HTTP/2 default, which exposed missing handling of 401 Unauthorized (and 407 Proxy Authentication Required). In HTTP/1.* we would handle this after the response had finished, while handling the status code. For h2 this path isn't used since it is heavily reliant on the structure we have for HTTP/1.* (one request per channel). So we must handle the status code and header directly. Having that part fixed exposed another issue - when resetting/rewinding uploaded data we were not resetting the 'totallyUploadedData' counter in the reply (this, in turn, exposed another small issue). Because of that we did not actually send any data on the retry, only sending the content-length followed by no data. Finally, the small issue mentioned in the previous paragraph was how we check if we have uploaded all our data. It was only checking if the byte-device was atEnd(), which it was. But only because it had not yet prepared any data for us. Fixes: QTBUG-91284 Pick-to: 6.1 6.0 5.15 Change-Id: I798d105b02688b18a02897cc476f19f57a47f98f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix linking on Windows when SSL is not configuredVolker Hilsheimer2021-04-261-1/+4
| | | | | | | | The qt_ForceTlsSecurityLevel symbol is not defined if SSL is not configured, so don't use it in the QNetworkReply test if it's not. Change-Id: Id3110a1997fea1648b48bfc411e90e7efe306678 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move plugin code from QtNetwork to qtbase/pluginsTimur Pocheptsov2021-04-222-58/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All TLS (and non-TLS) backends that QSsl classes rely on are now in plugins/tls (as openssl, securetransport, schannel and certonly plugins). For now, I have to disable some tests that were using OpenSSL calls - this to be refactored/re-thought. These include: qsslsocket auto-test (test-case where we work with private keys), qsslkey auto-test (similar to qsslsocket - test-case working with keys using OpenSSL calls). qasn1element moved to plugins too, so its auto-test have to be re-thought. Since now we can have more than one working TLS-backend on a given platform, the presence of OpenSSL also means I force this backend as active before running tests, to make sure features implemented only in OpenSSL-backend are tested. OCSP auto test is disabled for now, since it heavily relies on OpenSSL symbols (to be refactored). [ChangeLog][QtNetwork][QSslSocket] QSslSocket by default prefers 'openssl' backend if it is available. [ChangeLog][QtNetwork][QSslSocket] TLS-backends are not mutually exclusive anymore, depending on a platform, more than one TLS backend can be built. E.g., configuring Qt with -openssl does not prevent SecureTransport or Schannel plugin from being built. Fixes: QTBUG-91928 Change-Id: I4c05e32f10179066bee3a518bdfdd6c4b15320c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkCookie: Rename sameSite to sameSitePolicyMårten Nordheim2021-04-141-3/+3
| | | | | | | | | As suggested in the API review. Amends 37bd7b5733c7f1a4eb6ac5458fdc46f94a91194a Pick-to: 6.1 6.1.0 Change-Id: Ic3e8567f349568dc3b4dbf79be27c304b39480cf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Make qdecompresshelper archive bomb check only trigger for large filesØystein Heskestad2021-03-052-0/+40
| | | | | | | | | | | | This is to avoid false positives. By default files are large if uncompressed size > 10 MB. Only configurable internally. Also add auto tests. Task-number: QTBUG-91392 Pick-to: 6.0 6.1 Change-Id: I32258cb7c957f2a23a05157ba4ed5c0af2ba585e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move QEMU emulation detector to QTestSamuli Piippo2021-02-132-5/+3
| | | | | | | | | The emulation detection has been usable only on qtbase tests, move it to QTest so that it can be used in other modules as well. Pick-to: 6.1 Change-Id: I4b2321b7856414d7b1cfd5e6b1405a633c6bb878 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tests: remove unnecessary skips for qemuSamuli Piippo2021-01-282-13/+0
| | | | | | | QEMU sysroots are now root owned. Change-Id: Id829cb5debc449efee929ef83876e6ffbf78332c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Update public suffix list to today's latestEdward Welbourne2021-01-271-13/+18
| | | | | | | | | | | | | | | | | | | | | Fetched from the authoritative source, verified the content matches that of the current master revision in the github repository. Amend one cookie jar test to find the last group in the last chunk correctly - each group arises from a non-empty hsah-table entry, but the last few hash-table entries may be empty, in which case the last group isn't just before the last index, it's earlier by the number of empty hash table entries. In the process, amend this test and the related test of the end of the first chunk to iterate all the entries in the group (in the present version, as it happens, each end-group has just one entry, but that may vary). Task-number: QTBUG-90214 Pick-to: 6.0 5.15 Change-Id: I6da365a6ca558124f8275e392735071dc77e04bb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-125-132/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0717-139/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-2215-18/+38
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add SameSite API to QNetworkCookieAllan Sandfeld Jensen2020-12-071-0/+13
| | | | | Change-Id: I3f8b25418154f74bb55fa978b03465f75771d015 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_qnetworkreply: unblacklist putWithServerClosingConnectionImmediatelyMårten Nordheim2020-12-072-4/+3
| | | | | | | | | | | | Looking at grafana it rarely fails in dev so unblacklisting it. Though it is a little more flaky after switching to http 2 by default because then we only have one channel and more requests end up queued in the same channel, which will get errored out when the server disconnects. Task-number: QTBUG-88943 Change-Id: If5d6335864ce6bbc35f519b2c6d7068e4181afd2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_qnetworkreply: unblacklist various testsMårten Nordheim2020-12-071-18/+0
| | | | | | | | | | | | | | | | | | | headFromHttp hasn't been flaky since 5.14 times according to grafana, does not fail locally. Same situation with ioHttpRedirect as above. ioHttpRedirectMultipartPost has not failed on Windows since october 2019, assumed stable now. backgroundRequestInterruption no longer exists. ioPostToHttpFromSocket would fail in debug MSVC builds but was fixed in 710886fbdd993c3a618ea8bc8b59fbb3e18cfbf0. Task-number: QTBUG-88943 Change-Id: Ida640179ef15a3452291745e4e94a71a385f57ae Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_qnetworkreply: stabilize and unblacklist getFromHttpIntoBuffer2Mårten Nordheim2020-12-042-8/+7
| | | | | | | | | | | | | | The test in general is fine, but it was making an assumption that the first 5 readyRead emissions would never result in the whole message being received. In certain scenarios with slowdown however it was still possible that we would receive the whole message after just a few readyReady emissions. While I didn't check it's most likely due to a mechanic in the QNetworkReply machinery where we suppress some emissions if we know there's more data just about to be available. Task-number: QTBUG-88943 Change-Id: I0cf06edb34d4e86cc8a42c0f1cd7e8c35765f6ee Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_qnetworkreply: cleanup BLACKLISTTimur Pocheptsov2020-12-022-19/+27
| | | | | | | | | | | | Which contains a lot of 'macos'/'osx' black-listed auto-tests. They mostly fail with SecureTransport (on BigSur) because SecTrustEvaluate() does not like our old certificate. Instead, since SecureTransport is deprecated anyway and we are not planning to develop it in future, skip the related auto-test depending on QT_CONFIG(securetransport). Task-number: QTBUG-88943 Change-Id: I5f6cb7b2d0ea15c445603c1ff3e1700f123c28d1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Unblacklist tst_qnetworkreply getFromHttpMårten Nordheim2020-12-021-3/+0
| | | | | | | | | It was blacklisted due to the issue there. The issue is resolved, but the blacklist stayed. Task-number: QTBUG-88943 Change-Id: I7d9a660a17c1463dd8b654752ed5787fe5f5af24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Http2: Remove errored-out requests from queueMårten Nordheim2020-12-021-12/+0
| | | | | | | | | | | | | | | | | | The requests will remove themselves once they get deleted but since the deletion is done through a _queued_ invokeMethod to 'deleteLater' we will call QHttpNetworkConnection::_q_startNextRequest first which may end up starting a reconnect of the TCP socket which we had the error on. In this specific instance it manifested as a race condition where we either don't get a proxyAuthorizationRequired signal at all (it was emitted while we didn't have any valid replies), or we get the signal emitted too late and it gets emitted on whatever the next reply was. Task-number: QTBUG-88417 Pick-to: 5.15 6.0 Change-Id: If3f8ececc5550f1868c90124559cb8e3029646d8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>