diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-12-22 13:35:34 +0000 |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2012-01-04 17:28:06 +0000 |
commit | 5da61168e9f2eb3db9e4f6398eb784ab3ce21a50 (patch) | |
tree | 2a4c33990488924eef780ebe856b2c1eed184a34 | |
parent | b6b862050039c53e5f9bb25b86047dd0335c0d81 (diff) | |
download | qt4-tools-5da61168e9f2eb3db9e4f6398eb784ab3ce21a50.tar.gz |
Fix faulty logic in http connection pipelining
The code which prevents pipelining of requests when authentication is
in use had || where && should have been used.
Also check for blank user with a password.
Change-Id: Ic278cedd370c9d81377f49a0af43aef415cb49ad
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
(cherry picked from commit 058fb94afff8a1a9989ab6d18dacc1fe43769fdb)
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 0365703f9c..5ef4df07ef 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -582,9 +582,13 @@ void QHttpNetworkConnectionPrivate::fillPipeline(QAbstractSocket *socket) // we do not like authentication stuff // ### make sure to be OK with this in later releases - if (!channels[i].authenticator.isNull() || !channels[i].authenticator.user().isEmpty()) + if (!channels[i].authenticator.isNull() + && (!channels[i].authenticator.user().isEmpty() + || !channels[i].authenticator.password().isEmpty())) return; - if (!channels[i].proxyAuthenticator.isNull() || !channels[i].proxyAuthenticator.user().isEmpty()) + if (!channels[i].proxyAuthenticator.isNull() + && (!channels[i].proxyAuthenticator.user().isEmpty() + || !channels[i].proxyAuthenticator.password().isEmpty())) return; // must be in ReadingState or WaitingState |