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

QWebSocket unusable when connecting to TCP level SSL terminators

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.0 RC1
    • 5.12.4, 5.13.0
    • WebSockets
    • None
    • Windows 10, MacOS Mojave with prebuild Qt binaries from the installer
    • All
    • 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

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

        Activity

          People

            cnn Qt Core & Network
            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