Bug 82432

Summary: [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response
Product: WebKit Reporter: Li Yin <li.yin>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, tkent, webkit.review.bot, yutak
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Li Yin 2012-03-28 00:23:12 PDT
From RFC6455
http://tools.ietf.org/html/rfc6455#section-11.3.4
The |Sec-WebSocket-Protocol| header field MAY appear multiple times
in an HTTP request (which is logically the same as a single
|Sec-WebSocket-Protocol| header field that contains all values).
However, the |Sec-WebSocket-Protocol| header field MUST NOT appear
more than once in an HTTP response.
Comment 1 Li Yin 2012-03-28 00:32:57 PDT
Created attachment 134230 [details]
Patch
Comment 2 Yuta Kitamura 2012-03-28 01:03:19 PDT
Comment on attachment 134230 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=134230&action=review

I have just one nit. Your patch looks okay. Please get it reviewed by a WebKit reviewer.

> LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html:10
> +description("Test that WebSocket handshake fails if there are more one Sec-WebSocket-Protocol header field in the response.");

nit: "more" -> "more than"
Comment 3 Li Yin 2012-03-28 01:06:18 PDT
(In reply to comment #2)
> > LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html:10
> > +description("Test that WebSocket handshake fails if there are more one Sec-WebSocket-Protocol header field in the response.");
> 
> nit: "more" -> "more than"
Thanks for your detailed review. I will change it.
Comment 4 Li Yin 2012-03-28 01:10:57 PDT
Created attachment 134233 [details]
Patch
Comment 5 Kent Tamura 2012-03-28 01:24:07 PDT
Comment on attachment 134233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=134233&action=review

> Source/WebCore/ChangeLog:4
> +        [WebSocket]The Sec-WebSocket-Accept must not appear more than once in an HTTP response
> +        https://bugs.webkit.org/show_bug.cgi?id=82432

Do you mean Sec-WebSocket-Protocol?
Comment 6 Li Yin 2012-03-28 01:40:51 PDT
Created attachment 134236 [details]
Patch
Comment 7 Kent Tamura 2012-03-28 01:52:37 PDT
Comment on attachment 134236 [details]
Patch

ok
Comment 8 WebKit Review Bot 2012-03-28 02:12:15 PDT
Comment on attachment 134236 [details]
Patch

Clearing flags on attachment: 134236

Committed r112377: <http://trac.webkit.org/changeset/112377>
Comment 9 WebKit Review Bot 2012-03-28 02:12:21 PDT
All reviewed patches have been landed.  Closing bug.