From 058fb94afff8a1a9989ab6d18dacc1fe43769fdb Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 22 Dec 2011 13:35:34 +0000 Subject: 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 --- src/network/access/qhttpnetworkconnection.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 90cde6654f..d9738b6255 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -641,9 +641,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 -- cgit v1.2.3