diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-07-13 11:31:36 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-07-13 11:41:15 (GMT) |
commit | 1ed4c52dd7ad3cb6b0d846464b69489031ab68a5 (patch) | |
tree | d7abb0fbe0b28460572a2cdc60acf06d5e5504ae /src/network/access/qnetworkaccesshttpbackend.cpp | |
parent | 9b6eacab99673d7d9848b341c4cf36a7c35f07c0 (diff) | |
download | Qt-1ed4c52dd7ad3cb6b0d846464b69489031ab68a5.zip Qt-1ed4c52dd7ad3cb6b0d846464b69489031ab68a5.tar.gz Qt-1ed4c52dd7ad3cb6b0d846464b69489031ab68a5.tar.bz2 |
QNAM: Fix double sending of a HTTP request
In some cases, weird timing issues could occur. In those cases, an EOF
was sent twice for the upload data, leading to the HTTP code being
confused and sending the request headers twice.
Task-number: 257662
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/network/access/qnetworkaccesshttpbackend.cpp')
-rw-r--r-- | src/network/access/qnetworkaccesshttpbackend.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index ce800c2..c57157e 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -628,6 +628,10 @@ void QNetworkAccessHttpBackend::closeUpstreamChannel() { // this indicates that the user finished uploading the data for POST Q_ASSERT(uploadDevice); + + if (uploadDevice->eof) + return; // received a 2nd time. should fix 257662 and 256369 + uploadDevice->eof = true; emit uploadDevice->readChannelFinished(); } |