diff options
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnection_p.h | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkaccesshttpbackend.cpp | 11 | ||||
-rw-r--r-- | src/network/access/qnetworkaccesshttpbackend_p.h | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index f8f7620..f6cb530 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -350,7 +350,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket if (priv->phase == QAuthenticatorPrivate::Done) { pauseConnection(); if (!isProxy) { - emit q->authenticationRequired(reply->request(), auth, q); + emit q->authenticationRequired(reply, reply->request(), auth, q); #ifndef QT_NO_NETWORKPROXY } else { emit q->proxyAuthenticationRequired(networkProxy, auth, q); diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h index f2e0b1c..875c978 100644 --- a/src/network/access/qhttpnetworkconnection_p.h +++ b/src/network/access/qhttpnetworkconnection_p.h @@ -131,7 +131,7 @@ Q_SIGNALS: void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator, const QHttpNetworkConnection *connection = 0); #endif - void authenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *authenticator, + void authenticationRequired(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *authenticator, const QHttpNetworkConnection *connection = 0); void cacheCredentials(const QHttpNetworkRequest &request, QAuthenticator *authenticator, const QHttpNetworkConnection *connection = 0); diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index f617244..2af4987 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -344,8 +344,8 @@ void QNetworkAccessHttpBackend::setupConnection() connect(http, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); #endif - connect(http, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)), - SLOT(httpAuthenticationRequired(QHttpNetworkRequest,QAuthenticator*))); + connect(http, SIGNAL(authenticationRequired(const QHttpNetworkReply*, QHttpNetworkRequest,QAuthenticator*,const QHttpNetworkConnection*)), + SLOT(httpAuthenticationRequired(const QHttpNetworkReply*, QHttpNetworkRequest,QAuthenticator*))); connect(http, SIGNAL(cacheCredentials(QHttpNetworkRequest,QAuthenticator*)), SLOT(httpCacheCredentials(QHttpNetworkRequest,QAuthenticator*))); connect(http, SIGNAL(error(QNetworkReply::NetworkError,QString)), @@ -862,10 +862,13 @@ void QNetworkAccessHttpBackend::replyHeaderChanged() metaDataChanged(); } -void QNetworkAccessHttpBackend::httpAuthenticationRequired(const QHttpNetworkRequest &, +void QNetworkAccessHttpBackend::httpAuthenticationRequired(const QHttpNetworkReply *reply, + const QHttpNetworkRequest &, QAuthenticator *auth) { - authenticationRequired(auth); + // Only process this signal when it is for the QHttpNetworkReply that we actually have + if (reply == this->httpReply) + authenticationRequired(auth); } void QNetworkAccessHttpBackend::httpCacheCredentials(const QHttpNetworkRequest &, diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h index c4c88ae..f06f364 100644 --- a/src/network/access/qnetworkaccesshttpbackend_p.h +++ b/src/network/access/qnetworkaccesshttpbackend_p.h @@ -104,7 +104,7 @@ private slots: void replyReadyRead(); void replyFinished(); void replyHeaderChanged(); - void httpAuthenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *auth); + void httpAuthenticationRequired(const QHttpNetworkReply*, const QHttpNetworkRequest &request, QAuthenticator *auth); void httpCacheCredentials(const QHttpNetworkRequest &request, QAuthenticator *auth); void httpError(QNetworkReply::NetworkError error, const QString &errorString); bool sendCacheContents(const QNetworkCacheMetaData &metaData); |