Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Issue 105833003: Fail WebSocket channel when handshake fails. (Closed)

Created:
7 years ago by yhirano
Modified:
6 years, 11 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cbentzel+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fail WebSocket channel when handshake fails. Call WebSocketMsg_NotifyFailure instead of WebSocketMsg_AddChannelResponse(true, ...) when the opening handshake fails. BUG=310405 R=ricea@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243835

Patch Set 1 #

Patch Set 2 : #

Total comments: 18

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Total comments: 6

Patch Set 6 : rebase #

Patch Set 7 : #

Total comments: 10

Patch Set 8 : rebase #

Patch Set 9 : #

Patch Set 10 : rebase #

Total comments: 4

Patch Set 11 : #

Patch Set 12 : #

Total comments: 4

Patch Set 13 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+418 lines, -88 lines) Patch
M content/browser/renderer_host/websocket_dispatcher_host.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/websocket_dispatcher_host.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/renderer_host/websocket_host.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M net/http/http_stream_factory_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M net/websockets/websocket_basic_handshake_stream.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M net/websockets/websocket_basic_handshake_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +179 lines, -46 lines 0 comments Download
M net/websockets/websocket_channel.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/websockets/websocket_channel.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M net/websockets/websocket_channel_test.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +16 lines, -9 lines 0 comments Download
M net/websockets/websocket_event_interface.h View 1 1 chunk +10 lines, -0 lines 0 comments Download
M net/websockets/websocket_handshake_stream_base.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M net/websockets/websocket_stream.h View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M net/websockets/websocket_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +19 lines, -1 line 0 comments Download
M net/websockets/websocket_stream_test.cc View 1 2 3 4 5 6 7 8 27 chunks +143 lines, -23 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
yhirano
7 years ago (2013-12-06 03:47:55 UTC) #1
Adam Rice
Thank you for doing this. https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_basic_handshake_stream.cc#newcode100 net/websockets/websocket_basic_handshake_stream.cc:100: *failure_message = "'Sec-WebSocket-Accept' header ...
7 years ago (2013-12-06 07:02:30 UTC) #2
yhirano
https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_basic_handshake_stream.cc#newcode100 net/websockets/websocket_basic_handshake_stream.cc:100: *failure_message = "'Sec-WebSocket-Accept' header is missing"; On 2013/12/06 07:02:31, ...
7 years ago (2013-12-06 08:54:56 UTC) #3
Adam Rice
https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_channel.h File net/websockets/websocket_channel.h (right): https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_channel.h#newcode203 net/websockets/websocket_channel.h:203: // operation. Needs renaming & refactoring. On 2013/12/06 08:54:56, ...
7 years ago (2013-12-09 01:21:41 UTC) #4
yhirano
https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_channel.h File net/websockets/websocket_channel.h (right): https://codereview.chromium.org/105833003/diff/20001/net/websockets/websocket_channel.h#newcode203 net/websockets/websocket_channel.h:203: // operation. Needs renaming & refactoring. On 2013/12/09 01:21:41, ...
7 years ago (2013-12-09 06:11:13 UTC) #5
Adam Rice
https://codereview.chromium.org/105833003/diff/60001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/105833003/diff/60001/net/websockets/websocket_channel_test.cc#newcode1160 net/websockets/websocket_channel_test.cc:1160: // true means failure. Please remove this "// true ...
7 years ago (2013-12-09 07:41:12 UTC) #6
yhirano
https://codereview.chromium.org/105833003/diff/60001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/105833003/diff/60001/net/websockets/websocket_channel_test.cc#newcode1160 net/websockets/websocket_channel_test.cc:1160: // true means failure. On 2013/12/09 07:41:12, Adam Rice ...
7 years ago (2013-12-09 07:48:09 UTC) #7
Adam Rice
lgtm
7 years ago (2013-12-09 08:09:48 UTC) #8
yhirano
+tyoshino for net/websockets/ +szym for net/
7 years ago (2013-12-09 08:16:06 UTC) #9
szym
lgtm https://codereview.chromium.org/105833003/diff/70016/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/70016/net/websockets/websocket_basic_handshake_stream.cc#newcode8 net/websockets/websocket_basic_handshake_stream.cc:8: #include <iterator> include <string> https://codereview.chromium.org/105833003/diff/70016/net/websockets/websocket_basic_handshake_stream.cc#newcode40 net/websockets/websocket_basic_handshake_stream.cc:40: std::string MissingHeader(const ...
7 years ago (2013-12-09 18:49:58 UTC) #10
yhirano
https://codereview.chromium.org/105833003/diff/70016/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/70016/net/websockets/websocket_basic_handshake_stream.cc#newcode8 net/websockets/websocket_basic_handshake_stream.cc:8: #include <iterator> On 2013/12/09 18:49:58, szym wrote: > include ...
7 years ago (2013-12-10 03:30:09 UTC) #11
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_basic_handshake_stream.cc#newcode208 net/websockets/websocket_basic_handshake_stream.cc:208: &state, websockets::kSecWebSocketExtensions, &token)) { let's change "token" to some ...
7 years ago (2013-12-16 07:26:18 UTC) #12
yhirano
https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_basic_handshake_stream.cc#newcode208 net/websockets/websocket_basic_handshake_stream.cc:208: &state, websockets::kSecWebSocketExtensions, &token)) { On 2013/12/16 07:26:18, tyoshino wrote: ...
7 years ago (2013-12-16 08:05:37 UTC) #13
tyoshino (SeeGerritForStatus)
lg https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_channel_test.cc#newcode968 net/websockets/websocket_channel_test.cc:968: deleting_ = EVENT_ON_FAIL_CHANNEL | EVENT_ON_DROP_CHANNEL; On 2013/12/16 08:05:38, ...
6 years, 11 months ago (2014-01-09 04:08:47 UTC) #14
yhirano
https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_channel_test.cc File net/websockets/websocket_channel_test.cc (right): https://codereview.chromium.org/105833003/diff/110001/net/websockets/websocket_channel_test.cc#newcode968 net/websockets/websocket_channel_test.cc:968: deleting_ = EVENT_ON_FAIL_CHANNEL | EVENT_ON_DROP_CHANNEL; On 2014/01/09 04:08:48, tyoshino ...
6 years, 11 months ago (2014-01-09 05:24:51 UTC) #15
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/105833003/diff/260002/net/websockets/websocket_stream.cc File net/websockets/websocket_stream.cc (right): https://codereview.chromium.org/105833003/diff/260002/net/websockets/websocket_stream.cc#newcode77 net/websockets/websocket_stream.cc:77: switch (url_request_.status().status()) { how about listing all cases ...
6 years, 11 months ago (2014-01-09 05:52:04 UTC) #16
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/105833003/diff/260002/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/260002/net/websockets/websocket_basic_handshake_stream.cc#newcode156 net/websockets/websocket_basic_handshake_stream.cc:156: std::string last_parsed; i suggested last_parsed for the temporary variable. ...
6 years, 11 months ago (2014-01-09 05:53:54 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yhirano@chromium.org/105833003/400001
6 years, 11 months ago (2014-01-09 06:04:16 UTC) #18
yhirano
https://codereview.chromium.org/105833003/diff/260002/net/websockets/websocket_basic_handshake_stream.cc File net/websockets/websocket_basic_handshake_stream.cc (right): https://codereview.chromium.org/105833003/diff/260002/net/websockets/websocket_basic_handshake_stream.cc#newcode156 net/websockets/websocket_basic_handshake_stream.cc:156: std::string last_parsed; On 2014/01/09 05:53:55, tyoshino wrote: > i ...
6 years, 11 months ago (2014-01-09 06:04:18 UTC) #19
tyoshino (SeeGerritForStatus)
lgtm again
6 years, 11 months ago (2014-01-09 07:00:45 UTC) #20
commit-bot: I haz the power
6 years, 11 months ago (2014-01-09 10:38:08 UTC) #21
Message was sent while issue was closed.
Change committed as 243835

Powered by Google App Engine
This is Rietveld 408576698