qt5base-lts/tests/auto/network/access
Markus Goetz cff39fba10 QNAM: Fix upload corruptions when server closes connection
This patch fixes several upload corruptions if the server closes the connection
while/before we send data into it. They happen inside multiple places in the HTTP
layer and are explained in the comments.
Corruptions are:
* The upload byte device has an in-flight signal with pending upload data, if
it gets reset (because server closes the connection) then the re-send of the
request was sometimes taking this stale in-flight pending upload data.
* Because some signals were DirectConnection and some were QueuedConnection, there
was a chance that a direct signal overtakes a queued signal. The state machine
then sent data down the socket which was buffered there (and sent later) although
it did not match the current state of the state machine when it was actually sent.
* A socket was seen as being able to have requests sent even though it was not
encrypted yet. This relates to the previous corruption where data is stored inside
the socket's buffer and then sent later.

The included auto test produces all fixed corruptions, I detected no regressions
via the other tests.
This code also adds a bit of sanity checking to protect from possible further
problems.

[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection

Change-Id: I54c883925ec897050941498f139c4b523030432e
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2015-04-20 08:00:02 +00:00
..
qabstractnetworkcache Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qftp Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qhttpnetworkconnection Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qhttpnetworkreply Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qnetworkaccessmanager Merge remote-tracking branch 'origin/5.3' into 5.4 2014-09-29 13:38:11 +02:00
qnetworkcachemetadata Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qnetworkcookie Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qnetworkcookiejar Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qnetworkdiskcache tst_QNetworkDiskCache: Stop using actual web servers 2015-03-04 09:17:10 +00:00
qnetworkreply QNAM: Fix upload corruptions when server closes connection 2015-04-20 08:00:02 +00:00
qnetworkrequest Update license headers and add new license files 2014-09-24 12:26:19 +02:00
spdy Removing a few unneeded "? true : false" 2014-10-09 09:43:26 +02:00
access.pro network: add support for the SPDY protocol 2014-02-19 21:44:15 +01:00