Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95069 Add HTTP/2 support to Qt HTTP server
  3. QTBUG-124866

Change the QHttpServerResponder API to support the common functionality of HTTP 1.1 and HTTP 2

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Fixed
    • Not Evaluated
    • 6.8.0 FF
    • Qt Http Server
    • None
    • Foundation Sprint 69, Foundation Sprint 70, Foundation Sprint 71, Foundation Sprint 72, Foundation Sprint 73, Foundation Sprint 74, Foundation Sprint 75, Foundation Sprint 76, Foundation Sprint 101, Foundations Sprint 102, Foundation Sprint 103, Foundation Sprint 104, Foundation Sprint 105, Foundation Sprint 106, Foundation Sprint 107, Foundation Sprint 108, Foundation Sprint 109
    • bbc9e5def (dev)

    Description

      The API of the QHTTPServerResponder class is tailored for HTTP 1.1. Change it to make it possible to use for both HTTP 1.1 and HTTP 2.

      This means we must remove some of the low-level functions from the API and add some new functions:

      • We can no longer support writing the status separate from writing headers because :status is a pseudo-header to be sent with the other headers in HTTP 2.
      • We can also no longer write to the body without knowing if there will be more data left to write because HTTP 2 uses flags in the frames sent to determine when there is no more data, and when the socket is closed from the sender.

      The API should look like this:

      • Keep the write functions that allows the user to write a single response back with different data types. Also keep the sendResponse function to support sending a QHttpServerResponse back.
      • Remove the writeStatusLine, writeHeaders and writeBody functions.
      • Add a three sets of functions to let the user begin a chunked write, write a single chunk of data, and finalize the writing of chunked data. Chunking is HTTP 1.1 terminology, but it is the same as sending multiple DATA frames in HTTP 2. Other naming schemes are possible.

      Attachments

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

        Activity

          People

            oyheskes Øystein Heskestad
            oyheskes Øystein Heskestad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes