diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-05-12 08:14:02 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-05-12 08:15:01 (GMT) |
commit | 8902980cec40b25ec85ec20f79858224f68f73b6 (patch) | |
tree | b4c1ed5c660effeed25d0b576c77a944fdbd2acb /src/network/access/qhttpnetworkconnectionchannel.cpp | |
parent | d8af71198528c1e1c9b94471426c67e6deab7576 (diff) | |
download | Qt-8902980cec40b25ec85ec20f79858224f68f73b6.zip Qt-8902980cec40b25ec85ec20f79858224f68f73b6.tar.gz Qt-8902980cec40b25ec85ec20f79858224f68f73b6.tar.bz2 |
QNAM HTTP: Only force read when actual bytes available
This should fix the problem where we were showing a warning
that didn't matter anyway.
Task-number: QTBUG-9619
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 22dd5cb..6a13669 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -291,7 +291,8 @@ bool QHttpNetworkConnectionChannel::sendRequest() // ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called // this is needed if the sends an reply before we have finished sending the request. In that // case receiveReply had been called before but ignored the server reply - QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection); + if (socket->bytesAvailable()) + QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection); break; } case QHttpNetworkConnectionChannel::ReadingState: |