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

QHttpServer: Add support for headers in QHttpServerResponse

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        For Gerrit Dashboard: QTBUG-76933
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes