Disallow multiple HEADERS frames on pushed streams. |
||
Issue descriptionDisallow multiple HEADERS frames on pushed streams. HTTP/2 specification requires that the response has exactly one HEADERS frame (after zero or more informational 1xx HTTP responses which are not implemented yet, before trailers) (Section 8.1). This HEADERS frame must have a ":status" field (Section 8.1.2.4). Chromium already conforms to this on client-initiated streams, but not on pushed streams.
,
Nov 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4c21431268a20459813ce06a503300db42d2337f commit 4c21431268a20459813ce06a503300db42d2337f Author: bnc <bnc@chromium.org> Date: Mon Nov 28 16:49:15 2016 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 Review-Url: https://codereview.chromium.org/2526003002 Cr-Commit-Position: refs/heads/master@{#434669} [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/bidirectional_stream_spdy_impl.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/bidirectional_stream_spdy_impl.h [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_http_stream.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_http_stream.h [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_network_transaction_unittest.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_proxy_client_socket.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_proxy_client_socket.h [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_session.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_session.h [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_session_pool_unittest.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_stream.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_stream.h [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_stream_test_util.cc [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_stream_test_util.h [modify] https://crrev.com/4c21431268a20459813ce06a503300db42d2337f/net/spdy/spdy_stream_unittest.cc
,
Nov 28 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by b...@chromium.org
, Nov 17 2016