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

Make QHttpServerRequest copyable

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P1: Critical
    • 6.10
    • 6.9, 6.10
    • Qt Http Server
    • None
    • 21
    • 7c6ff5fab (dev), 2db3fbb5f (6.9), 242fe6c9c (6.8), 807b0f34f (dev), 8abc9a4ec (dev), fdc52d19a (dev), f242e8b11 (dev)
    • Foundation Sprint 125, Foundation Sprint 126, Foundation Sprint 127, Foundation Sprint 128, Foundation Sprint 129

    Description

      The QHttpServerRequest object is not copyable because it serves as both the parser and the request class. However, using QConcurrent::run() for route handlers that return QFuture<QHttpServerResponse> introduces a race condition. The afterRequestHandlers must retain the previous request state, but since only one request object is instantiated (in QHttpServerHttp[12]ProtocolHandler classes), it may be overwritten by other requests before afterRequestHandlersare executed.

      Making QHttpServerRequest copyable would allow passing copies of request objects instead of duplicating individual components during QConcurrent::run() invocations. To achieve this, extract the parser state into a private QHttpServerParser class and make QHttpServerRequest copyable.

      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
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: