qt5base-lts/tests/auto
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
..
android Android: don't report xfail 2015-01-19 15:48:50 +01:00
bic/data bic: Add 5.{1,2,3,4}.0 bic data for linux-gcc-amd64 2015-02-14 06:54:20 +00:00
cmake Update license headers and add new license files 2014-09-24 12:26:19 +02:00
compilerwarnings/data Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
concurrent Update license headers and add new license files 2014-09-24 12:26:19 +02:00
corelib QMimeDatabase: Fix magic rules with \t 2015-03-10 12:17:32 +00:00
dbus Fix compilation with older MSVC: use qIsNan instead of isnan 2015-01-15 08:40:14 +01:00
gui Fix rasterization errors in aliased cosmetic drawPolyLine 2015-03-19 09:01:08 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network QNAM: Fix upload corruptions when server closes connection 2015-04-20 08:00:02 +00:00
opengl Change bugreports.qt-project.org -> bugreports.qt.io 2014-12-18 09:46:09 +01:00
other Introduce qt_subtract_from_timeout to reduce code duplication. 2015-03-09 17:11:54 +00:00
printsupport Fix QPrinter::setPaperSize regression when using QPrinter::DevicePixel 2015-01-19 10:39:55 +01:00
shared Android: Keyboard doesn't hide from done button 2014-10-25 07:19:35 +02:00
sql Correction on bound values in case of repeated QSqlQuery::execBatch 2015-01-16 13:14:26 +01:00
testlib Autotest: Selftests fail in UTC timezone 2015-01-19 10:21:26 +01:00
tools Make QtDBus unit tests compile with runtime dbus-1 too 2015-01-06 18:16:32 +01:00
widgets QComboBox: Update completer on setCurrentIndex() 2015-03-18 16:57:19 +00:00
xml Update license headers and add new license files 2014-09-24 12:26:19 +02:00
auto.pro Temporarily disable the QtDBus tests if the session bus isn't available 2014-12-23 12:22:56 +01:00
network-settings.h Autotest: don't leak a socket every call to QtNetworkSettings::hasIPv6 2015-01-08 01:06:17 +01:00
qtest-config.h Update license headers and add new license files 2014-09-24 12:26:19 +02:00
test.pl Autotest: Find all autotests due to changed naming conventions 2015-01-16 08:14:55 +01:00