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

Unified Diff: net/tools/quic/quic_spdy_client_stream.cc

Issue 1910593004: Plumbs new SpdyFramerVisitorInterface method handling through QUIC test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119562680
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/quic/spdy_utils.h ('K') | « net/tools/quic/quic_spdy_client_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_spdy_client_stream.cc
diff --git a/net/tools/quic/quic_spdy_client_stream.cc b/net/tools/quic/quic_spdy_client_stream.cc
index 8ac758a5236a220891d8ab6a8f72ad7cbf33e3c8..f589d18cb5b900ada5dcfca581f7cf7362e05a6c 100644
--- a/net/tools/quic/quic_spdy_client_stream.cc
+++ b/net/tools/quic/quic_spdy_client_stream.cc
@@ -68,6 +68,34 @@ void QuicSpdyClientStream::OnInitialHeadersComplete(bool fin,
session_->OnInitialHeadersComplete(id(), response_headers_);
}
+void QuicSpdyClientStream::OnInitialHeadersComplete(
+ bool fin,
+ size_t frame_len,
+ const QuicHeaderList& header_list) {
+ QuicSpdyStream::OnInitialHeadersComplete(fin, frame_len, header_list);
+
+ DCHECK(headers_decompressed());
+ header_bytes_read_ += frame_len;
+ if (!SpdyUtils::CopyAndValidateHeaders(header_list, &content_length_,
+ &response_headers_)) {
+ DLOG(ERROR) << "Failed to parse header list: " << header_list.DebugString();
+ Reset(QUIC_BAD_APPLICATION_PAYLOAD);
+ return;
+ }
+
+ if (!ParseHeaderStatusCode(&response_headers_, &response_code_)) {
+ DLOG(ERROR) << "Received invalid response code: "
+ << response_headers_[":status"].as_string();
+ Reset(QUIC_BAD_APPLICATION_PAYLOAD);
+ return;
+ }
+
+ ConsumeHeaderList();
+ DVLOG(1) << "headers complete for stream " << id();
+
+ session_->OnInitialHeadersComplete(id(), response_headers_);
+}
+
void QuicSpdyClientStream::OnTrailingHeadersComplete(bool fin,
size_t frame_len) {
QuicSpdyStream::OnTrailingHeadersComplete(fin, frame_len);
@@ -92,6 +120,24 @@ void QuicSpdyClientStream::OnPromiseHeadersComplete(QuicStreamId promised_id,
session_->HandlePromised(id(), promised_id, promise_headers);
}
+void QuicSpdyClientStream::OnPromiseHeaderList(
+ QuicStreamId promised_id,
+ size_t frame_len,
+ const QuicHeaderList& header_list) {
+ header_bytes_read_ += frame_len;
+ int64_t content_length = -1;
+ SpdyHeaderBlock promise_headers;
+ if (!SpdyUtils::CopyAndValidateHeaders(header_list, &content_length,
+ &promise_headers)) {
+ DLOG(ERROR) << "Failed to parse promise headers: "
+ << header_list.DebugString();
+ Reset(QUIC_BAD_APPLICATION_PAYLOAD);
+ return;
+ }
+
+ session_->HandlePromised(id(), promised_id, promise_headers);
+}
+
void QuicSpdyClientStream::OnDataAvailable() {
if (FLAGS_quic_supports_push_promise) {
// For push streams, visitor will not be set until the rendezvous
« net/quic/spdy_utils.h ('K') | « net/tools/quic/quic_spdy_client_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698