summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-03-30 15:48:51 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-04-05 10:21:40 (GMT)
commit989ca02a932cf7c90e8d29c18dd72415e46afb81 (patch)
tree65b0aac9fc3931eaa517b82c46b7ea93e80a278b /src/network/access
parente1f5699f262d52e72d6855440cfc1c2919b74163 (diff)
downloadQt-989ca02a932cf7c90e8d29c18dd72415e46afb81.zip
Qt-989ca02a932cf7c90e8d29c18dd72415e46afb81.tar.gz
Qt-989ca02a932cf7c90e8d29c18dd72415e46afb81.tar.bz2
Fix assert fail when debug log is enabled
Enough debug logging allows time for the proxy server to close the http connection after sending a 407 response. This errors the connection, but then the queued _q_startNextRequest is immediately run, causing an assertion failure. Changed this to a soft failure which allows the error to propagate rather than crashing. Test case is tst_qnetworkreply::ioPostToHttpFromSocket Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index a6d6172..6fbc6f8 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -842,7 +842,10 @@ void QHttpNetworkConnectionChannel::handleStatus()
bool QHttpNetworkConnectionChannel::resetUploadData()
{
- Q_ASSERT(reply);
+ if (!reply) {
+ //this happens if server closes connection while QHttpNetworkConnectionPrivate::_q_startNextRequest is pending
+ return false;
+ }
QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice();
if (!uploadByteDevice)
return true;