[Webkit-unassigned] [Bug 82307] [WebSocket]Browser must fail connection if Sec-WebSocket-Protocol mismatched.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 27 06:38:40 PDT 2012


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





--- Comment #6 from joey <li.yin at intel.com>  2012-03-27 06:38:39 PST ---

(In reply to comment #3)
> > Source/WebCore/ChangeLog:9
> > +        From RFC6455, if the WebSocket openhanding respond included the mismatched
> > +        Sec-WebSocket-Protocol header field, the client must fail the WebSocket Connection.
> 
> I think it is useful when you also add a link to the spec.
Yeah, I will add the linked address in the ChangeLog

> > LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html:24
> > +    if (protocolCase[curTestNumber] === "")
> > +        ws = new WebSocket(url);
> 
> How does this case happen?
> 
> All the tests are run with integers. The strict equality does not seems to mach any of the invocation.
When the curTestNumber is 0, the protocolCase[curTestNumber] equals "", protocolCase[curTestNumber] === "" returns true.

> > +    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
> 
> The comment should probably be on the above line if you want to follow python's style.
This style should be accepted, many current test case used this style, such as long-invalid-header_wsh.py, unmasked-frames_wsh.py etc.

-- 
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