summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Http2: remove any reference to HttpReply when deletedMårten Nordheim2025-05-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to switching the protocol handler to use QHttp2Connection this particular issue (see bugreport) was not a problem because the handling of the IO-device being destroyed was simply to drop any pointer to it. QHttp2Stream, however, also has to keep track of the lifetime of the IO-device, because it needs to abort the stream if the data it's uploading is destroyed earlier than expected. Now, since QHttp2Stream might also have other errors come up, we have to connect to the generic 'errorOccurred' signal from it and handle whatever issues arise, notifying our users that the request for some reason cannot be fulfilled. It's thanks to this part that we were now, in certain cases, grabbing a stale pointer to the HttpNetworkReply and trying to call functions on it. We fix this somewhat indirectly. Because, after a HttpReply is destroyed, we shouldn't even have any references to it in the first place. And while it would usually be done as part of handling the deleted() signal, we actually disconnect from HttpNetworkReply's signals when we have processed one of the finished*() functions. But since we were still connected to the stream's signals we would still try to handle it. For the http1 protocol handler this was already handled in QHttpNetworkConnection::removeReply, which the HttpNetworkReply itself calls at start of destruction. The function will go through any place that the reply can be referenced and removes it. For http/2 it would remove it from the list of requests yet to be sent, but not from the in-progress list. So, we now add a new virtual function to the AbstractProtocolHandler and specialize it in Http2 to handle exactly this. Fixes: QTBUG-136549 Pick-to: 6.9.1 6.9 Change-Id: Ie41863677a3b163f77d10bc3904ca515f6840be3 Reviewed-by: Mate Barany <[email protected]>
* Remove zone id from IPv6 host in prepareRequestValentin Batz2025-03-151-1/+13
| | | | | | | | | | | Ensure that link-local IPv6 addresses in a HTTP Request do not include the zone identifier in the 'Host' header, as per RFC 6874. This prevents connection failures due to invalid host syntax. Fixes: QTBUG-134727 Change-Id: I7067a991f67d44241717a89b656a3fcbda1fcd3a Reviewed-by: Øystein Heskestad <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* Remove stray qpair includesMatthias Rauter2024-11-251-1/+0
| | | | | | | | | Amends a41c860c7dacfb6b785e0a24a4c3f26c3cde3c20 Task-number: QTBUG-115841 Change-Id: If8a65513935899085f135a22b42d756f1a3fbebc Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* Replace all QPair/qMakePair with std::pair in qtbase/networkIsak Fyksen2024-10-241-1/+1
| | | | | | | Task-number: QTBUG-115841 Change-Id: I34f3106e4b50a18cc19c4cda597205c346e7561e Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Øystein Heskestad <[email protected]>
* Enable compilation of qtbase with localserver offMichał Łoś2024-09-191-0/+4
| | | | | | | | | | | Since we will need to turn off this feature for certain platforms, code must compile with QT_FEATURE_localserver turned off, which now can't. Fix this by disabling parts of code requiring QT_FEATURE_localserver. Task-number: QTBUG-115777 Pick-to: 6.8 Change-Id: I6d78030db67ee679d6877b48a437db90a6e47a02 Reviewed-by: Mårten Nordheim <[email protected]>
* Http: Add support for full localsocket pathsMårten Nordheim2024-05-241-1/+6
| | | | | | | | | | [ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now supports using full local server name, as in, named pipes on Windows or path to socket objects on Unix. Task-number: QTBUG-102855 Change-Id: Ifc743f5025b3d8d0b558ecffff437881897915d9 Reviewed-by: Timur Pocheptsov <[email protected]>
* Http: Support unix+http: scheme in http backendMårten Nordheim2024-05-151-5/+10
| | | | | | | | | | [ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now supports local connections using the uri schemes unix+http: or local+http:. Fixes: QTBUG-102855 Change-Id: I1f47b74ab42b51d97b3c555cc3afd6ccd272e1ed Reviewed-by: Mate Barany <[email protected]>
* Http connection( channel)?: support local socketMårten Nordheim2024-05-151-14/+31
| | | | | | | Task-number: QTBUG-102855 Change-Id: Idcf571498b7a18792cf7843a826d78672e264a73 Reviewed-by: Mate Barany <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* QNAM: Prepare protocol handlers for local socketMårten Nordheim2024-05-021-11/+11
| | | | | | | | | + a small stretch into adjacent functions, because some are used from the protocol handler(s). Task-number: QTBUG-102855 Change-Id: Ie394378fef2b1723e69286fd870fc34b7306734a Reviewed-by: Thiago Macieira <[email protected]>
* QNAM: Trivial AbstractSocket*=>IODevice* transformsMårten Nordheim2024-04-231-4/+4
| | | | | | | | | In preparation for the socket potentially being a QLocalSocket. Task-number: QTBUG-102855 Change-Id: I9889f72fc55d945ba6c392d573293628ec052164 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Mate Barany <[email protected]>
* QHttpNetworkConnectionPrivate: reflow ctorMårten Nordheim2024-04-171-8/+11
| | | | | | Task-number: QTBUG-102855 Change-Id: Idcb67b434f9f627a408d730d9cec8d749094728e Reviewed-by: Edward Welbourne <[email protected]>
* QHttpNetworkConnectionPrivate: NSDMIMårten Nordheim2024-04-171-3/+1
| | | | | | | | Initialize the hardcoded things inside the class. Task-number: QTBUG-102855 Change-Id: I06da0a615ec066e63d9cd0359313e8e8f588718e Reviewed-by: Edward Welbourne <[email protected]>
* QHttpNetworkConnectionPrivate: move some init logic into a functionMårten Nordheim2024-04-171-6/+10
| | | | | | | | | Now we can nicely initialize it as a member-initializer. Do channels at the same time, NSDMI follows. Task-number: QTBUG-102855 Change-Id: I59c1fe044687500ed3a9d5878c6e4fc137114542 Reviewed-by: Edward Welbourne <[email protected]>
* QHttpNetworkConnection: Remove redundant/unused ctorMårten Nordheim2024-04-171-35/+0
| | | | | | | Task-number: QTBUG-102855 Change-Id: Ifcd25c241f2e331b0c271d3462b5a2896797d101 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* tst_QHttpNetworkConnection: Move to use only one ctorMårten Nordheim2024-04-171-3/+0
| | | | | | | | | We want to get rid of the other one, it's all internal API anyway. Task-number: QTBUG-102855 Change-Id: I2b621c20f4dd7c8bf5f07db8db908c2b7b86976f Reviewed-by: Timur Pocheptsov <[email protected]>
* QHttpNetworkConnection: optimize startNextRequestAnton Kudryavtsev2024-03-211-5/+9
| | | | | | | | | Use QVLA instead of QQueue to avoid allocations and use QSpan to emulate queue behavior to avoid N^2 Change-Id: I333bc1af98a596fc041765996867a3d6449fcfde Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* Network: Use QHttpHeaders in QHttpHeaderParserLena Biliaieva2024-01-251-8/+5
| | | | | | | | | | | | | QHttpHeaderParser::headers() method is changed to return QHttpHeaders. QAuthenticatorPrivate::parseHttpResponse() method is changed to work with QHttpHeaders. QHttpNetworkHeader::header() method is updated to return QHttpHeaders. Tests are updated. Task-number: QTBUG-120133 Change-Id: I20a18b509acd7a8b8d93884cff8349519d64293e Reviewed-by: Ievgenii Meshcheriakov <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Øystein Heskestad <[email protected]>
* QHttpNetworkConnection: use QSB moreAnton Kudryavtsev2023-10-301-1/+1
| | | | | | | to avoid needless tmp allocation Change-Id: I582f86adbe274b67ddbc7255caea63a39137edcc Reviewed-by: Mårten Nordheim <[email protected]>
* QHttpNetworkConnection: mark some methods as constAnton Kudryavtsev2023-10-301-4/+4
| | | | | | | | These get methods (sslContext and connectionType) are part of private API, so it's safe Change-Id: I6c2e14d5dbcbefc051d69985d1e9b490274ba7ef Reviewed-by: Mårten Nordheim <[email protected]>
* http2: When a reply is removed from the queue, only remove oneMårten Nordheim2023-10-161-11/+10
| | | | | | | | | | | | | | | | | | We were using the .remove(Key) API on the map instead of erase(iterator), so we were removing any reply of the same priority that had not yet been popped from the queues. Rewrote to drop loop and only work with iterators. This issue was there since SPDY days, so not picking all the way back to 5.15, where HTTP2 anyway is not enabled by default. As a drive-by, drop the #ifndef QT_NO_SSL, which was also there from SPDY times, which was TLS-only. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-116167 Change-Id: Id7e1eb311e009b86054c1fe3d049c760d711a18a Reviewed-by: Edward Welbourne <[email protected]>
* Http: don't try to send request on a closed socketMårten Nordheim2023-10-131-0/+5
| | | | | | | | | | | | We have code in the protocolHandlers that tries to handle this case, but if we have an error before we create protocolHandler (read: proxy complains about something) we will assert in debug, or deref nullptr in release. Pick-to: 6.6 6.5 6.2 Change-Id: I4bde9c8af0fa96dc11f77ca4d4b5cb84c31b54fa Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* network: use string view types moreAnton Kudryavtsev2023-09-061-1/+1
| | | | | | | Prefer QLatin1StringView overloads Change-Id: I23846761f2c93021de4f6e6b7eba1d74045f89a1 Reviewed-by: Edward Welbourne <[email protected]>
* qhttpnetworkconnection: extract method makeAcceptLanguageAnton Kudryavtsev2023-09-041-11/+13
| | | | | | | | | and micro optimize it: - avoid allocation in case of C locale - don't call replace in case of C locale Change-Id: I9afefd53b673e5f1236afdb3130d77779614acc7 Reviewed-by: Mårten Nordheim <[email protected]>
* qhttpnetworkconnection: cache acceptedEncoding headerAnton Kudryavtsev2023-09-041-2/+2
| | | | | | | Encodings are configured at compile time, so no need to re-create acceptedEncoding header for every request, just cache it. Change-Id: Ibfaf7cdec0504cf90c4b6a59848e7c945d060ebe Reviewed-by: Mårten Nordheim <[email protected]>
* Handle authenticate challenge for NegotiateMårten Nordheim2023-07-181-1/+2
| | | | | | | | | | | | | | | | | Because we didn't handle Negotiate in the "Start" phase during handleAuthenticateChallenge, we would not emit the auth signal before our second attempt, assuming the server prompts us for one. Emitting the authenticationRequired signal is needed for users to be able to set the Service Principal Name (SPN) option. Alternatively, username and password if not relying on Single sign-on. Done-by: Emil Wipplinger <> Pick-to: 6.6 6.5 Fixes: QTBUG-114559 Change-Id: I833c08dfeda36a6548c5ad6b8af4b8aa9d644c45 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* QNetworkReply: Propagate proxy errors properlyMichael Klein2023-06-271-2/+10
| | | | | | | | | | | | Map QNetworkError::HostNotFoundError and QNetworkError::ConnectionRefusedError to ProxyNotFoundError resp. ProxyConnectionRefusedError when it originated from the communication with the proxy server. Fixes: QTBUG-68821 Pick-to: 6.5 6.6 Change-Id: I21b91f2667ba0cd329d4ece1fe543472cdab2d22 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* QNetworkAccessManager: Configurable number of HTTP1 TCP connectionsMarkus Goetz2022-12-091-1/+10
| | | | | | | | | | | Introduces new class QHttp1Configuration. [ChangeLog][QtNetwork][QHttp1Configuration] New class. Fixes: QTBUG-25280 Fixes: QTBUG-108215 Change-Id: Ide6cee23946e5001befb8fab34edf10b8a66e02b Reviewed-by: Mårten Nordheim <[email protected]>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-111-1/+1
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <[email protected]>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
* QAuthenticator: Fix crash when using NTLM / NegotiateMårten Nordheim2022-08-171-4/+16
| | | | | | | | | | | | | | | | | | | With NTLM/Negotiate we delete the context used to generate replies once we get SEC_E_OK. Due to some faulty logic in the http backend we could end up trying to generate another response. Qt would then pass references to some offsets of nullptr into the API calls causing it to crash. Add some sanity checks before the "sspi continue" calls to make sure this won't happen, and update the condition in the http backend to check that we have not already sent our credentials. As a drive-by: correct the initialization of the handles to use SecInvalidateHandle instead of memset to 0. Pick-to: 6.4 6.3 6.2 5.15 Fixes: QTBUG-102359 Change-Id: I884ff8fc70609fe8746b99a1d56eeafcda9d2620 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QtHttp: Lower the severity of some log outputMårten Nordheim2022-08-041-5/+4
| | | | | | | | | | | | | | The output was only printed if the request was no longer available queued, meaning that it had been removed before the socket had finished its connection attempt. That means the result of the attempt is not of much interest to the user so we should not print it out as a warning. The reason for why the request was removed from the queue would be the interesting bit, but it's not covered here. Task-number: QTBUG-85248 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Iac483b8bb600e1577fe88c3699e46d50615bfccb Reviewed-by: Timur Pocheptsov <[email protected]>
* Provide more details of failed connectionAndré Klitzing2022-07-231-0/+2
| | | | | | | | | | | Otherwise the errorString from qtls_openssl is lost that would help a lot why a tls connection failed. "Error during SSL handshake: error:1414D17A:SSL routines:tls12_check_peer_sigalg:wrong curve" Pick-to: 6.4 6.3 6.2 Change-Id: Iab74b73488219686e5926308db02bc4063818c9f Reviewed-by: Mårten Nordheim <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* QtNetwork: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-211-5/+7
| | | | | | Task-number: QTBUG-98434 Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f Reviewed-by: Mårten Nordheim <[email protected]>
* QHttp: Don't reorder content-length header for no reasonMårten Nordheim2022-04-211-2/+3
| | | | | | | | | | | If the user supplied a content-length, and we also know the size of the payload then we would set the content-length again, which is a remove + add on a QList. This is completely avoidable if we are setting the same size anyway. Fixes: QTBUG-102495 Change-Id: If62739cadb453dbda4c21e858ba3a17baaf71fb4 Reviewed-by: Edward Welbourne <[email protected]>
* HTTP: Make redirect response parsing more genericMårten Nordheim2022-02-111-16/+23
| | | | | | | | | | | | | | To enable its use in the http2 protocol handler. This factors out the error-reporting code for HTTP 1, which in any case has to be done differently for HTTP 2, saving duplication and simplifying the redirect handling code. Task-number: QTBUG-100651 Pick-to: 6.3 6.2 5.15 Change-Id: I4b470646a9ad5ee702c9b1921d115e137d3d5b8b Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Øystein Heskestad <[email protected]> Reviewed-by: Marc Mutz <[email protected]>
* Network: Emit authenticationRequired when using NtlmSören Bohn2022-02-021-1/+6
| | | | | | | | | | | | Adds a new state Phase1 to QAuthenticatorPrivate::Phase which is used when authenticating using Ntlm. The new state forces an emit of the authenticationRequired signal and tracks that it is called only once. Fixes: QTBUG-44096 Pick-to: 6.2 6.3 5.15 Change-Id: Icc9662d4fdc1f0f8c8e8bc5538f211baaa055d4c Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* 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 <[email protected]>
* wasm: fix unused variable warning/errorMorten Johan Sørvig2021-08-191-1/+1
| | | | | Change-Id: If6dabc94f6d64695a0b28e73061274f8ea1c4ed6 Reviewed-by: Tor Arne Vestbø <[email protected]>
* QNetworkReply: Add two new signalsMarkus Goetz2021-07-201-0/+9
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Mårten Nordheim <[email protected]>
* Hold QSslContext in shared_ptrMarc Mutz2021-07-181-2/+2
| | | | | | | | | | | ... 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 <[email protected]>
* QNetworkReply: Decompress when readingMårten Nordheim2021-06-121-0/+1
| | | | | | | | | | | 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 <[email protected]>
* QHttpNetworkConnectionPrivate::createAuthorization: refactorMårten Nordheim2021-05-201-7/+7
| | | | | | | | | Grab a reference to the channel instead of indexing into the array repeatedly. Change-Id: I114d571fcfcfd3a751346b513cec728dc2fcda0a Reviewed-by: Timur Pocheptsov <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* QHttpNetworkConnectionChannel: remove *authMethodMårten Nordheim2021-05-201-34/+31
| | | | | | | | | | | | | | | We store the authenticator right alongside it, which knows the method. The biggest change from this is changing a, self-proclaimed, duplicate method from QHttpNetworkReply. Finding the method name ahead-of-time is not actually needed, all we need to know is that a supported authentication method is requested. Also moved that specific functionality to a more logical location: QAuthenticatorPrivate. Change-Id: I11627803ccb42b8ec33a28ef1d1e00bf60dc6da9 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>
* Prefer previously used channels in QHttpNetworkConnectionLars Schmertmann2021-05-111-19/+38
| | | | | | | | | | | | | | | | | | When IPv4 and IPv6 are supported by a server, QHttpNetworkConnection will start up two connections and pick the network layer of the one that finish first. In this case the channel with index 1 is used for IPv6. When IPv6 wins, there is no channel at index 0. This situation needs to be respected and we should try to use existing channels first when there is a next request. This is especially important when TLS session resumption is used. Creating a new channel will cause to lose the ephemeralServerKey used in the first connection. Fixes: QTBUG-93295 Pick-to: 5.15 6.1 Change-Id: Ic9dc6a24ef793a29c2652ad37bc11120e2e6ceef Reviewed-by: Mårten Nordheim <[email protected]>
* HTTP/2 authentication requiredMårten Nordheim2021-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Remove QNetworkStatusMonitorMårten Nordheim2021-02-061-2/+2
| | | | | | | | | | Since the old code is now fully integrated in QNetworkInformation backends Change-Id: Ia843d17bb3c98333e8d68752e25722b5860f48e0 Reviewed-by: Timur Pocheptsov <[email protected]> Reviewed-by: Edward Welbourne <[email protected]> (cherry picked from commit 7860b9e6ffece207d054ac0c321bc3c5b983708f) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
* Http2: don't call ensureConnection when there's no request availableMårten Nordheim2020-12-021-1/+3
| | | | | | | | | | | | | | Previously we only checked if there was something in the h2 queue or if we had not yet switched to http2. These means in some cases that following an error it would enter this branch and, because it had not yet switched to http2, it would call 'ensureConnection' which would try start a reconnection. This could make the proxy socket engines try to emit 'auth required' with no replies, meaning nothing happens. Fixes: QTBUG-88417 Pick-to: 5.15 6.0 Change-Id: If37b8c71ac36597adc305fb1b1ea4fa7b48b0d28 Reviewed-by: Timur Pocheptsov <[email protected]>
* QAuthenticator: condition using GSSAPI on credentials availabilityMårten Nordheim2020-09-111-1/+8
| | | | | | | | | | | | AFAICT with GSSAPI the normal workflow is to run kinit or similar and authenticate before running programs relying on it. Therefore we can try to get the credentials before we choose whether or not to use Negotiate. Pick-to: 5.15 Task-number: QTBUG-85123 Change-Id: If0478fdd45389b2939ad87c2f582776fe56959bb Reviewed-by: Timur Pocheptsov <[email protected]>
* QNAM: fix stall due to edge case when connected with no request queuedMårten Nordheim2020-09-101-2/+12
| | | | | | | | | | | | It really could only manifest itself if you started a request and then immediately cancelled it and then started another one to the same site. But only if in a certain race outcome - the connection that the backend was establishing had to finish connecting after aborting but before a new request had been queued! Change-Id: I7cad2cf4ac1f64cc838498cefa076cd2c6d26701 Reviewed-by: Alex Blasche <[email protected]> Reviewed-by: Timur Pocheptsov <[email protected]>