[Webkit-unassigned] [Bug 81072] [WebSocket]Browser should use 1000 as status code when WebSocket API close is called without status code parameter.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 22 22:39:13 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=81072





--- Comment #8 from Takashi Toyoshima <toyoshim at chromium.org>  2012-04-22 22:39:13 PST ---
Hi, Li.

I post a similar comment on the w3c thread, too.

[from RFC6455 7.1.5.]
> a Close control frame may contain a status code indicating a reason for closure.
> (snip)
> If this Close control frame contains no status code, _The WebSocket
> Connection Close Code_ is considered to be 1005.  If _The WebSocket
> Connection is Closed_ and no Close control frame was received by the
> endpoint (such as could occur if the underlying transport connection
> is lost), _The WebSocket Connection Close Code_ is considered to be
> 1006.

Actually, RFC said code and reason are optional. It uses 'MAY' in normative sections. I understand that this is because the API allow to omit them. As a result, pseudo code 1005 is needed for representing this case. 1005 doesn't represent any unexpected or error case.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list