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

QHttpServer: Add support for headers in QHttpServerResponse

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 6.4.0 Beta1
    • 5.13.0
    • Network: HTTP
    • None

      Currently, we can only construct a QHttpServerResponse from the content type, the actual content and a status code. It would be very useful to be able to also set arbitrary HTTP-Headers for the response.

      A basic use case would be content encoding: If we want to compress data before sending it, the Content-Encoding header must be set - which requires the application to set this header.

      Note: I am aware that it is possible to specify headers via QHttpServerResponder. However, we cannot use this class directly when working with QHttpServer. I personally think this is simple and relevant enough to extend QHttpServerResponse to allow custom headers even when using the "simplified" interface.

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

            mikhailsvetkin Mikhail Svetkin
            SkyCoder Felix Barz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes