diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-10-03 15:27:34 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-10-04 14:43:48 (GMT) |
commit | 7ed7ba658b2f48e5a94a4fc6bbb637dd13ab1a6c (patch) | |
tree | b8419ee4189f774b0b95f57f61976090038ae869 | |
parent | 61919115f0645c30514bd88109335b8f4637d192 (diff) | |
download | Qt-7ed7ba658b2f48e5a94a4fc6bbb637dd13ab1a6c.zip Qt-7ed7ba658b2f48e5a94a4fc6bbb637dd13ab1a6c.tar.gz Qt-7ed7ba658b2f48e5a94a4fc6bbb637dd13ab1a6c.tar.bz2 |
QNAM - fix poor performance of HEAD request with authentication
QHttpNetworkReply was waiting for a body to be sent for 401 and 407
responses, whereas with a HTTP HEAD request, there will be no body.
This delayed the authentication signal until after the http channel
is closed by the server after a timeout. For example with the server
used for autotesting, the authentication signal is delayed 15 seconds.
When the server has a very long timeout, the authentication signal may
not be emitted at all.
Task-Number: QT-5304
Reviewed-By: Martin Petersson
-rw-r--r-- | src/network/access/qhttpnetworkreply.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 0f2fcba..129e2c6 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -816,7 +816,7 @@ bool QHttpNetworkReplyPrivate::expectContent() || statusCode == 204 || statusCode == 304) return false; if (request.operation() == QHttpNetworkRequest::Head) - return !shouldEmitSignals(); + return false; // no body expected for HEAD request qint64 expectedContentLength = contentLength(); if (expectedContentLength == 0) return false; |