Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27161

HTTP header may be damaged

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.4, 5.0.0 Beta 2
    • 4.8.1, 4.8.2
    • Network
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shkearns Shane Kearns
            tomaszduda Tomasz Duda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes