summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-06-22 08:45:51 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-06-24 23:55:42 (GMT)
commit40bf547f50dbb624431317ba6c3b46b485ab808e (patch)
treeb98b4e0db7256eff21bfe86a6e6a042158b505fc
parent39092105c93e63e92f8f543af953bcf9f4ebddce (diff)
downloadQt-40bf547f50dbb624431317ba6c3b46b485ab808e.zip
Qt-40bf547f50dbb624431317ba6c3b46b485ab808e.tar.gz
Qt-40bf547f50dbb624431317ba6c3b46b485ab808e.tar.bz2
Ensure that Proxy-Connection: Keep-Alive is respected for HTTP 1.0
When doing a NTML authentication it would close the connection after the second phase before replying when the reply was a HTTP 1.0 version reply. Since the Proxy-Connection header is set to Keep-Alive in this case we want to ensure we do not close in this siutation. Task-number: QTBUG-26037 Change-Id: Icaaf2277efc0d05a946c52fb42b5191964e2e0fe (cherry picked from commit bd5ef309ba831740fd8475b2f7415f30c1a18be8) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
-rw-r--r--src/network/access/qhttpnetworkreply.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index e52aa80..e452017 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -643,7 +643,8 @@ qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
// check for explicit indication of close or the implicit connection close of HTTP/1.0
connectionCloseEnabled = (connectionHeaderField.toLower().contains("close") ||
headerField("proxy-connection").toLower().contains("close")) ||
- (majorVersion == 1 && minorVersion == 0 && connectionHeaderField.isEmpty());
+ (majorVersion == 1 && minorVersion == 0 &&
+ (connectionHeaderField.isEmpty() && !headerField("proxy-connection").toLower().contains("keep-alive")));
}
return bytes;
}