Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.1, 4.8.2
-
None
-
60f4fc8b706db9cbeacd5dc4886a7aa347daafc0 (5.0), 872d6aff3ea96d548e0bad99def669b803368a36 (4.8)
Description
"HTTP/1.1 100 CONTINUE\r\n"
If the header from a server is splitted between two packets the first packet contains "HTTP/1.1 100" and the second one contains " CONTINUE\r\n", one space (0x20) is skipped. After processing the line looks in this way "HTTP/1.1 100CONTINUE".
QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) function is called twice, if a http header is splitted as above. The function always removes whitespace from the beginning of a packet, even if it is the second part of a http header.
This causes connection error (QNetworkReply::RemoteHostClosedError).
I found the bug when I used https connection.
A patch is included.