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

QWebSocket returns wrong schema using SSL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.8.0
    • 5.7.0
    • WebSockets
    • None
    • 503a1353dcf23f8a5fcb8a2c79d55f707e75cf33

      When connect to an wss socked, QWebSocket requestUrl().toString() returns always ws. But in this case it must be wss.

      Sample:
      from http://doc.qt.io/qt-5/qtwebsockets-sslechoserver-sslechoserver-cpp.html
      change

      qDebug() << "Client connected:" << pSocket->peerName() << pSocket->origin();
      

      to

      qDebug() << "Client connected:" << pSocket->peerName() << pSocket->origin();
      qDebug()<< pSocket->requestUrl().toString();
      

      The result will be:
      "ws://localhost:1234/"
      instant of
      "wss://localhost:1234/"

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

            aleksey_lysenko Aleksey Lysenko
            tuxmaster Frank Büttner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes