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

QWebSocket unusable when connecting to TCP level SSL terminators

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.4, 5.13.0
    • Fix Version/s: 5.14.0 RC1
    • Component/s: WebSockets
    • Labels:
      None
    • Environment:
      Windows 10, MacOS Mojave with prebuild Qt binaries from the installer
    • Platform/s:
      All
    • Commits:
      26983aef39a702d2de7c519b5a3f7a8150c8beeb (qt/qtwebsockets/5.14.0)

      Description

      When sending the HTTP upgrade request the Host part of the header should not contain the port if the port is not specified in the QUrl used for the open() call. Currently at least for wss port 443 is always present in the Host(ex: Host: echo.websocket.org:443).

      Such behavior causes issues with SSL terminators that are working on TCP level. The virtual host configuration of the web server that is behind the SSL terminator does not recognize correctly the host. Some reverse proxies are even terminating the connection when they receive a connection to port 80 but see port 443 in the Host part of the HTTP header.

      The fix should be easy: Don't put port number in the Host if the port is not explicitly specified in the QUrl that is passed to the QWebSocket::open() method.

      P.S. Would be very nice if this is fixed in 5.12.x.

        Attachments

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

          Activity

            People

            Assignee:
            cnn Qt Core & Network
            Reporter:
            storm Nikolay Nikolov Baklicharov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes