diff options
author | Liang Qi <liang.qi@qt.io> | 2019-07-01 10:21:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-07-01 10:21:37 +0200 |
commit | d25c3227299a6a281db37e68e45f0b02db3f5297 (patch) | |
tree | 08f436f8aebe2c8aaaee570f88e71bd2d0c8f6e7 /src/network/access | |
parent | 222b81f5dac2a5d32027b15d3a784819291431f6 (diff) | |
parent | a39b19b0c7419021b3c22dc4d4bced0995f3a29f (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/network/ssl/qsslsocket_openssl.cpp
src/platformsupport/vkconvenience/qvkconvenience.cpp
Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 12 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 2e38ac2dcf..1f1de478ea 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -1579,19 +1579,21 @@ void QHttpNetworkConnectionPrivate::emitProxyAuthenticationRequired(const QHttpN // dialog is displaying pauseConnection(); QHttpNetworkReply *reply; -#ifndef QT_NO_SSL - if (connectionType == QHttpNetworkConnection::ConnectionTypeSPDY) { + if (connectionType == QHttpNetworkConnection::ConnectionTypeHTTP2 + || connectionType == QHttpNetworkConnection::ConnectionTypeHTTP2Direct +#if QT_CONFIG(ssl) + || connectionType == QHttpNetworkConnection::ConnectionTypeSPDY +#endif + ) { + // we choose the reply to emit the proxyAuth signal from somewhat arbitrarily, // but that does not matter because the signal will ultimately be emitted // by the QNetworkAccessManager. Q_ASSERT(chan->spdyRequestsToSend.count() > 0); reply = chan->spdyRequestsToSend.cbegin().value().second; } else { // HTTP -#endif // QT_NO_SSL reply = chan->reply; -#ifndef QT_NO_SSL } -#endif // QT_NO_SSL Q_ASSERT(reply); emit reply->proxyAuthenticationRequired(proxy, auth); diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 9309d718e4..3c9d53c5b5 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -209,6 +209,9 @@ void QHttpNetworkConnectionChannel::init() void QHttpNetworkConnectionChannel::close() { + if (state == QHttpNetworkConnectionChannel::ClosingState) + return; + if (!socket) state = QHttpNetworkConnectionChannel::IdleState; else if (socket->state() == QAbstractSocket::UnconnectedState) @@ -1125,11 +1128,13 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket void QHttpNetworkConnectionChannel::_q_proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator* auth) { if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2 + || connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2Direct #ifndef QT_NO_SSL || connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY #endif ) { - connection->d_func()->emitProxyAuthenticationRequired(this, proxy, auth); + if (spdyRequestsToSend.count() > 0) + connection->d_func()->emitProxyAuthenticationRequired(this, proxy, auth); } else { // HTTP // Need to dequeue the request before we can emit the error. if (!reply) |