Complete HTTP/1.0 support


Make QtHttpServer support writeChunk() and write() using sequential
QIODevice for HTTP/1.0. Close the socket when all data is sent
because HTTP/1.0 does not have chunked transfer encoding support.

The socket is closed using disconnectFromHost() because close()
closes immediately before transmitting the remaining contents. Also
use invokeMethod() using QueuedConnection to ensure all data is
processed before closing.

For QLocalSocket use disconnectFromServer(), even though it
is the server, because this is the function that closes the
connection after sending all data, unlike close() which closes
abruptly.

Respect the incoming "Connection" header, which is by default
"close" for HTTP/1.0 and "keep-alive" for HTTP/1.1. If the
length is unknown for HTTP/1.0 set it to "close".

Send the "Connection" header with value "keep-alive" for tests
where the connection is reused.

Fixes: QTBUG-138410
Pick-to: 6.11
Change-Id: Ia99db97557cff83937c0fa98f166b414d2c51ba3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
commit4fd19291a3a6c77991b0905785ec628868c12604
parent1de0a09f59113433cda37906b7b28d5650d4fa02
authorØystein Heskestad <oystein.heskestad@qt.io>
committerØystein Heskestad <oystein.heskestad@qt.io>
commit timeTue, 9 Dec 2025 16:04:15 +0000