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

QHttpServer: Add support for headers in QHttpServerResponse

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.13.0
    • Fix Version/s: None
    • Component/s: Network: HTTP
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      73175545e69cc5f07a7a1447a6b8c4c74d9795c8 (qt-labs/qthttpserver/master)

      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

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

          Activity

            People

            • Assignee:
              mikhailsvetkin Mikhail Svetkin
              Reporter:
              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