summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-12-19 15:35:52 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2012-01-04 17:37:00 (GMT)
commitef91776735216f23b3d708032b81435d045e8e56 (patch)
tree7777d95722df6d6745a76b37f1968f96add9568d /src/network/access/qhttpnetworkconnectionchannel.cpp
parent682555cb0104f90117f0e492999c41362ab7aad9 (diff)
downloadQt-ef91776735216f23b3d708032b81435d045e8e56.zip
Qt-ef91776735216f23b3d708032b81435d045e8e56.tar.gz
Qt-ef91776735216f23b3d708032b81435d045e8e56.tar.bz2
Fix race in http connection channel
When authentication is cancelled, close the channel instead of the underlying socket. The previous behaviour could result in further requests being sent on the closed socket, which caused errors in case of https over a proxy. Change-Id: I3dbfc164de4fb29a426c06acaac8f29b9da1d705 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit a7b99151f4445755c91d5227607d9ea2f785301f)
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index e4f0f12..628114a 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -847,6 +847,9 @@ void QHttpNetworkConnectionChannel::handleStatus()
closeAndResendCurrentRequest();
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
}
+ } else {
+ //authentication cancelled, close the channel.
+ close();
}
} else {
emit reply->headerChanged();