Bug 82432 - [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HTTP response
Summary: [WebSocket]The Sec-WebSocket-Protocol must not appear more than once in an HT...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-28 00:23 PDT by Li Yin
Modified: 2012-03-28 02:12 PDT (History)
5 users (show)

See Also:


Attachments
Patch (7.01 KB, patch)
2012-03-28 00:32 PDT, Li Yin
no flags Details | Formatted Diff | Diff
Patch (7.02 KB, patch)
2012-03-28 01:10 PDT, Li Yin
no flags Details | Formatted Diff | Diff
Patch (7.02 KB, patch)
2012-03-28 01:40 PDT, Li Yin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.