[Bug 16703] I am suggesting a default value for the "code" argument to the close method. I am currently experimenting with this method and noticed that Chrome and Firefox seem to use different default values. If I do not specify a code, Chrome appears to use 1005 (

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16703

Bronislav Klu&#269;ka <bronislav.klucka@bauglir.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bronislav.klucka@bauglir.co
                   |                            |m

--- Comment #1 from Bronislav Klu&#269;ka <bronislav.klucka@bauglir.com> 2012-04-11 21:53:20 UTC ---
Hi, 
actually 1000 should be the default:
those close codes are protocol level codes, when using WebSocket API you are
already using implementation of client within UA, so the WS.close() method
really means regular/normal close, that should be interpreted as regular/normal
close.
1005 should be interpreted at server level as some sort of warning (no error
code, no 1000 "I'm done" code... strange).
No one can manually send 1005 code, in WS.close method, so this defaults would
require to specify 1000 all the time, always... It would be better to default
to it from program code and leave 1005 to actual UI/server communication in
strange cases.
>From protocol point of view, application should not be able to send 1005 code
of it's own (which you suggest)

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 11 April 2012 21:53:24 UTC