This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12916 - Default values for code and reason when wasClean is false
Summary: Default values for code and reason when wasClean is false
Status: RESOLVED WORKSFORME
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebSocket API (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: public-webapps-bugzilla
URL: http://dev.w3.org/html5/websockets/#e...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 18:00 UTC by Adrian Bateman [MSFT]
Modified: 2011-06-21 23:03 UTC (History)
4 users (show)

See Also:


Attachments

Description Adrian Bateman [MSFT] 2011-06-08 18:00:30 UTC
The spec should explicitly indicate the default values for the code and reason attributes if there are no values from the server (a non-clean close). We recommend 0 for the code and null for reason.
Comment 1 Adrian Bateman [MSFT] 2011-06-10 22:06:20 UTC
With the -08 protocol changes, it looks like 1006 should be the default value for the code and empty string for the reason when no CLOSE_FRAME is received from the server (unclean close).
Comment 2 Ian 'Hixie' Hickson 2011-06-21 23:03:42 UTC
The protocol spec defines this for us; the API spec explicitly references the same terms as the protocol spec to make sure the loop is closed on this.