Index: net/quic/quic_client_session_base.cc |
diff --git a/net/quic/quic_client_session_base.cc b/net/quic/quic_client_session_base.cc |
index dd9974aa77cf2ce16ed8d334a867a13b5518a0d4..e70334dd6d0b7251ffa53c0cfbadceb01b166de8 100644 |
--- a/net/quic/quic_client_session_base.cc |
+++ b/net/quic/quic_client_session_base.cc |
@@ -80,6 +80,30 @@ void QuicClientSessionBase::OnPromiseHeadersComplete( |
stream->OnPromiseHeadersComplete(promised_stream_id, frame_len); |
} |
+void QuicClientSessionBase::OnPromiseHeaderList( |
+ QuicStreamId stream_id, |
+ QuicStreamId promised_stream_id, |
+ size_t frame_len, |
+ const QuicHeaderList& header_list) { |
+ if (promised_stream_id != kInvalidStreamId && |
+ promised_stream_id <= largest_promised_stream_id_) { |
+ connection()->CloseConnection( |
+ QUIC_INVALID_STREAM_ID, |
+ "Received push stream id lesser or equal to the" |
+ " last accepted before", |
+ ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
+ return; |
+ } |
+ largest_promised_stream_id_ = promised_stream_id; |
+ |
+ QuicSpdyStream* stream = GetSpdyDataStream(stream_id); |
+ if (!stream) { |
+ // It's quite possible to receive headers after a stream has been reset. |
+ return; |
+ } |
+ stream->OnPromiseHeaderList(promised_stream_id, frame_len, header_list); |
+} |
+ |
void QuicClientSessionBase::HandlePromised(QuicStreamId /* associated_id */, |
QuicStreamId id, |
const SpdyHeaderBlock& headers) { |