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

Websocket disconnect instantly from QHttpServer

XMLWordPrintable

    • 904b76d95 (tqtc/lts-6.5), 7e106fa8d (tqtc/lts-6.5)
    • Foundation Sprint 134, Foundation Sprint 135

      A customer reported that when they try to connect to a httpserver with a websocket, they can get the connection on server side OK but the server pretty much instantly closes the socket.

      Steps to reproduce the issue:

      • Run server
      • Run client

      => Observe the client output

      When building server with Qt 6.8.3 and adding:

          s.addWebSocketUpgradeVerifier(&s, [](const QHttpServerRequest &request) {
              return QHttpServerWebSocketUpgradeResponse::accept();
          }); 

      the sample will work. The connection will no longer be closed and and the message from the server can now be received.

        1. client.zip
          0.9 kB
        2. server.zip
          1 kB
        For Gerrit Dashboard: QTBUG-138560
        # Subject Branch Project Status CR V

            oyheskes Øystein Heskestad
            oyheskes Øystein Heskestad
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes