Errors thrown during WebSocket upgrade could hang clients when reading HTTP response
Categories
(Remote Protocol :: Agent, defect, P2)
Tracking
(firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
Details
(Whiteboard: [bidi-m1-mvp])
Attachments
(1 file)
Using a non websocket compatible HTTP client like curl
, and trying to connect to an existing WebDriver session will hang the request. Internally you can see errors like:
[JavaScript Error: "Error: The handshake request has incorrect Upgrade header: undefined" {file: "chrome://remote/content/server/WebSocketHandshake.jsm" line: 84}]
But sadly those aren't returned to the client. As such the request hangs until a timeout.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Using triage whiteboard entry to discuss inclusion for M1.
Assignee | ||
Comment 2•3 years ago
|
||
When a WebSocket upgrade fails we currently do not
send any details of the error. As such it makes
it hard to figure out the real underlying issue.
Further some clients like curl are hanging and do
not immediately exit when the response has been
received. Specifying the Content-Length header
within the response fixes it.
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eec37405fe16 [remote] Report WebSocket handshake failures to the client. r=webdriver-reviewers,jgraham
Comment 4•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•