-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.6.2
-
None
A call to QWebsocket.open(QUrl(url)) will only start to "do something" when the control is given back to the event loop. When my code includes a line with a call to QWebsocket.ping() before the control is given back to the event loop, then the first line of the first request to the websocket server will not be 'GET / HTTP/1.1' as it should be, but b'\x89\x80\xf2\xb8\xa9\xb2GET / HTTP/1.1'. This causes a response "400 Bad Request" by at least Python websocket servers and no connection can be established.
The documentation does not say anything about this behavior. It does not even say that open() is non-blocking.
This problem affects bot PySide6 and PyQt6, so maybe the Bug is in Qt, but I am unable to find the relevant piece of code.