[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 02:37:59 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=82307
--- Comment #2 from Yuta Kitamura <yutak at chromium.org> 2012-03-27 02:37:59 PST ---
(From update of attachment 134001)
View in context: https://bugs.webkit.org/attachment.cgi?id=134001&action=review
> Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:737
> + size_t i;
> + for (i = 0; i < result.size(); ++i) {
> + if (serverWebSocketProtocol == result[i])
> + break;
> + }
> + if (i == result.size()) {
> + m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch";
> + return false;
> + }
Use Vector<>::contains().
> LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html:21
> +function doTest(curTestNumber)
nit: We usually don't prefer abbreviated names like "cur".
> LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html:40
> + return ;
nit: The space before semicolon is not necessary.
--
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