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

Issue 2526003002: Disallow multiple HEADERS frames on pushed streams. (Closed)

Created:
4 years ago by Bence
Modified:
4 years ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disallow multiple HEADERS frames on pushed streams. Functional: * Send RST_STREAM if HEADERS do not contain ":status" on pushed stream. * Log HTTP2_STREAM_ERROR if response is received before request is sent. * Log HTTP2_STREAM_ERROR if trailers are received on a pushed stream. * Log HTTP2_STREAM_ERROR if trailers are received after trailers. * Log HTTP2_STREAM_ERROR if data are received after trailers. Refactoring: * Add plenty of unittests. * Move all header block checks from SpdySession and from SpdyStream::Delegate to SpdyStream. * Change SpdyStream::Delegate::OnResponseHeadersUpdated type to void. * Make enum SpdyResponseHeaderStatus private to SpdyStream, rename entries. * Rename SpdyStream::Delegate::OnResponseHeadersUpdated() to OnHeadersReceived(), since update is not allowed. * Change SpdyHttpStream::response_headers_status_ type to bool, rename. * Remove tests that rely on the net stack incorrectly accepting invalid responses. * Remove SpdySession::ActiveStreamInfo::waiting_for_reply_headers_frame, inline now trivial SpdySession::ActiveStreamInfo struct. * Rename SpdyStream::Delegate::OnRequestHeadersSent() to OnHeadersSent() to match OnData{Received,Sent} methods. * Make TryCreatePushStream() void as return value was dropped on the floor anyway. * Combine SpdyStream::OnInitialResponseHeadersReceived() and OnAdditionalResponseHeadersReceived() into a single OnHeadersReceived() method. * Rename SpdyStream::MergeWithResponseHeaders() to SaveResponseHeaders() as no merging is done any more. BUG=666383 Committed: https://crrev.com/4c21431268a20459813ce06a503300db42d2337f Cr-Commit-Position: refs/heads/master@{#434669}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rename enum, enum entry, and member. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+503 lines, -748 lines) Patch
M net/spdy/bidirectional_stream_spdy_impl.h View 1 chunk +2 lines, -3 lines 0 comments Download
M net/spdy/bidirectional_stream_spdy_impl.cc View 3 chunks +3 lines, -5 lines 0 comments Download
M net/spdy/spdy_http_stream.h View 2 chunks +3 lines, -6 lines 0 comments Download
M net/spdy/spdy_http_stream.cc View 6 chunks +10 lines, -13 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 chunk +0 lines, -214 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.h View 1 chunk +2 lines, -3 lines 0 comments Download
M net/spdy/spdy_proxy_client_socket.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M net/spdy/spdy_session.h View 3 chunks +3 lines, -21 lines 0 comments Download
M net/spdy/spdy_session.cc View 39 chunks +62 lines, -127 lines 0 comments Download
M net/spdy/spdy_session_pool_unittest.cc View 1 chunk +2 lines, -5 lines 0 comments Download
M net/spdy/spdy_stream.h View 1 8 chunks +43 lines, -96 lines 0 comments Download
M net/spdy/spdy_stream.cc View 1 11 chunks +96 lines, -157 lines 0 comments Download
M net/spdy/spdy_stream_test_util.h View 5 chunks +9 lines, -13 lines 0 comments Download
M net/spdy/spdy_stream_test_util.cc View 5 chunks +10 lines, -17 lines 0 comments Download
M net/spdy/spdy_stream_unittest.cc View 7 chunks +252 lines, -62 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Bence
Ryan: PTAL. Thank you, and have a nice weekend!
4 years ago (2016-11-23 20:41:58 UTC) #6
Ryan Hamilton
NICE! https://codereview.chromium.org/2526003002/diff/1/net/spdy/spdy_http_stream.cc File net/spdy/spdy_http_stream.cc (right): https://codereview.chromium.org/2526003002/diff/1/net/spdy/spdy_http_stream.cc#newcode325 net/spdy/spdy_http_stream.cc:325: DCHECK(headers_valid); Why is this a DCHECK as opposed ...
4 years ago (2016-11-23 20:58:43 UTC) #7
Bence
PTAL at response to comments. I'll do the enum rename next week. Thank you. https://codereview.chromium.org/2526003002/diff/1/net/spdy/spdy_http_stream.cc ...
4 years ago (2016-11-23 21:15:59 UTC) #8
Ryan Hamilton
fair enough. LGTM!
4 years ago (2016-11-23 22:02:49 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2526003002/40001
4 years ago (2016-11-28 14:07:57 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years ago (2016-11-28 16:49:47 UTC) #15
commit-bot: I haz the power
4 years ago (2016-11-28 16:54:56 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4c21431268a20459813ce06a503300db42d2337f
Cr-Commit-Position: refs/heads/master@{#434669}

Powered by Google App Engine
This is Rietveld 408576698