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}
15 files changed