Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.9.1
-
None
Description
In Qt 5.9.1 and possibly 5.9.0, passing a custom (non-standard) baseUrl value to setHtml will cause any usage of WebSockets to crash the presentation engine with a series of message starting with VALIDATION_ERROR_DESERIALIZATION_FAILED, shutting down the web engine and preventing any further processing or setting of html data. Note this only seems to affect WebSockets; loading of files and etc seems to work correctly.
In prior versions this worked correctly, allowing for the use of a QWebEngineUrlSchemeHandler to handle custom schemes (such as loading images or files from a database if the scheme was "foobar").
Steps to test:
Use the minimal example from the webenginewidgets source tree. Modify the view.setUrl line to not load qt.io but to instead read the contents of a local disk file (see attached) and use view.setHtml with the loaded string. Note the web sockets test code working. Change the setHtml to have a QUrl("foobar:/") base url and run again; this will cause the IPC to fail and stop all further html processing.
The attached file is from https://www.websocket.org/echo.html copied from their example code.
Attachments
Issue Links
- duplicates
-
QTBUG-62536 WebSockets not supported when loaded from non-default scheme
- Closed