Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 Area-Undefined
New issue 128057 by
jduell.m...@gmail.com: Websocket should fire 'error'
event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057
Hi, I'm the developer for the Firefox websockets stack.
Chrome Version :18.0.1025.142 (Official Build 129054)
URLs (if applicable) :
Other browsers tested: Firefox
Add OK or FAIL after other browsers where you have tested this issue:
Firefox 14/15 (aurora/nightly): OK
What steps will reproduce the problem?
1. Load attached file in browser (make sure no websocket server is running
on localhost port 9988)
2. Observe that websocket's onerror method is not called in Chrome, but is
in Firefox.
What is the expected result?
Step 8 in the 'websocket constructor' algorithm in the W3C "The WebSocket
API Editor's Draft 8 May 2012" says that if, while connecting, "the status
code received from the server is not 101 (e.g. it is a redirect), the user
agent must fail the websocket connection." Failing the WS connection
involves firing the 'error' method. Firefox is doing this, but Chrome isn't.
To be fair, the W3C spec is really pretty unclear about the exact behavior
that should happen when a websocket fails to establish any sort of TCP
connection at all with the server (i.e. the server is down/missing).
Should we open a W3C bug to clarify the spec? I'd like to make sure
Firefox and Chrome do the same thing here.
Attachments:
ws_close.html 1.1 KB