summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-02-15 17:58:11 +0000
committerQt by Nokia <qt-info@nokia.com>2012-02-17 15:03:53 +0100
commitd425a0dad38e51c99cfe59294a3706ced90b24a0 (patch)
treef133baa37b71da3efef75d96528fd3070e13c603 /src/network/access
parent6f7bd6532d34713811c8f70b287d151d24cdda7c (diff)
Fix incorrect use of QObject::disconnect in synchronous http request
In certain circumstances, this could cause the request to time out (and repeatedly send bad authentication credentials to the server) instead of failing with AuthenticationRequiredError. Change-Id: Iff66b32f1d7268f21fd77b6620aae4b5d49d857f Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index 5cf153325b..3901635ca0 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -560,7 +560,8 @@ void QHttpThreadDelegate::synchronousAuthenticationRequiredSlot(const QHttpNetwo
}
// Disconnect this connection now since we only want to ask the authentication cache once.
- QObject::disconnect(this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*)));
+ QObject::disconnect(httpReply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)),
+ this, SLOT(synchronousAuthenticationRequiredSlot(QHttpNetworkRequest,QAuthenticator*)));
}
#ifndef QT_NO_NETWORKPROXY
@@ -577,7 +578,8 @@ void QHttpThreadDelegate::synchronousProxyAuthenticationRequiredSlot(const QNet
}
// Disconnect this connection now since we only want to ask the authentication cache once.
- QObject::disconnect(this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*)));
+ QObject::disconnect(httpReply, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
+ this, SLOT(synchronousProxyAuthenticationRequiredSlot(QNetworkProxy,QAuthenticator*)));
}
#endif