Closed Bug 676025 Opened 14 years ago Closed 14 years ago

Websockets - failure to connect should generate onerror

Categories

(Core :: Networking: WebSockets, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: mcmanus, Assigned: mcmanus)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

When there is a websocket connection error we currently issue a close event, but not an error event. The current API requires the error event: "If the establish a WebSocket connection algorithm fails, it triggers the fail the WebSocket connection algorithm, which then invokes the close the WebSocket connection algorithm, which then establishes that the WebSocket connection is closed, which fires the close event as described below." [..] "When the WebSocket connection is closed, possibly cleanly, the user agent must queue a task to run the following substeps: Change the readyState attribute's value to CLOSED (3). If the user agent was required to fail the websocket connection, fire a simple event named error at the WebSocket object. [WSP] Create an event that uses the CloseEvent interface, with the event name close, which does not bubble, is not cancelable, has no default action, whose wasClean attribute is set to true if the connection closed cleanly and false otherwise, whose code attribute is set to the WebSocket connection close code, and whose reason attribute is set to the WebSocket connection close reason decoded as UTF-8, with error handling, and dispatch the event at the WebSocket object. [WSP]"
Attached patch patch 1Splinter Review
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
Attachment #550133 - Flags: review?(jonas)
Comment on attachment 550133 [details] [diff] [review] patch 1 Review of attachment 550133 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #550133 - Flags: review?(jonas) → review+
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: