summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-02-20 16:18:29 +0000
committerQt by Nokia <qt-info@nokia.com>2012-02-21 15:28:40 +0100
commit49a7c2fe6e905bc192008c13f08842e4b8134ff9 (patch)
tree0a78365e06bce50178cb52f576e8e1e17af80eb8 /src/network/access/qhttpnetworkconnectionchannel.cpp
parentae445b20fa2567f7e14d989f288edb69b0904433 (diff)
Make https requests fail fast when configured without ssl support
Restored the Qt4 behaviour where attempting a https request using QNetworkAccessManager fails with ProtocolUnsupportedError instead of timing out or hanging. Covered by existing autotests. Task-number: QTBUG-17189 Change-Id: Iceb1ba6558c7d2b1af8ddf8d4ea9315a5b44d970 Reviewed-by: Richard J. Moore <rich@kde.org>
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 70368d5e50..b6b37db242 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -610,6 +610,9 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
// here and there.
socket->setReadBufferSize(64*1024);
#else
+ // Need to dequeue the request so that we can emit the error.
+ if (!reply)
+ connection->d_func()->dequeueRequest(socket);
connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ProtocolUnknownError);
#endif
} else {