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

Unified Diff: net/quic/core/quic_spdy_stream.cc

Issue 2430973004: Landing Recent QUIC changes until 10:38 AM, Oct 17, 2016 UTC-4 (Closed)
Patch Set: Improving flagsaver logging Created 4 years, 2 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
« no previous file with comments | « net/quic/core/quic_spdy_stream.h ('k') | net/quic/core/quic_spdy_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_spdy_stream.cc
diff --git a/net/quic/core/quic_spdy_stream.cc b/net/quic/core/quic_spdy_stream.cc
index 3777177c1bfae9a449f2dd5a5d5ba2b6d1d219bd..502145c66de315a6500f3412cbd1ad03535c73bb 100644
--- a/net/quic/core/quic_spdy_stream.cc
+++ b/net/quic/core/quic_spdy_stream.cc
@@ -29,6 +29,7 @@ QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session)
: ReliableQuicStream(id, spdy_session),
spdy_session_(spdy_session),
visitor_(nullptr),
+ allow_bidirectional_data_(false),
headers_decompressed_(false),
priority_(kDefaultPriority),
trailers_decompressed_(false),
@@ -204,6 +205,16 @@ void QuicSpdyStream::OnStreamHeadersComplete(bool fin, size_t frame_len) {
void QuicSpdyStream::OnStreamHeaderList(bool fin,
size_t frame_len,
const QuicHeaderList& header_list) {
+ // The headers list avoid infinite buffering by clearing the headers list
+ // if the current headers are too large. So if the list is empty here
+ // then the headers list must have been too large, and the stream should
+ // be reset.
+ if (FLAGS_quic_limit_uncompressed_headers && header_list.empty()) {
+ OnHeadersTooLarge();
+ if (IsDoneReading()) {
+ return;
+ }
+ }
if (!headers_decompressed_) {
OnInitialHeadersComplete(fin, frame_len, header_list);
} else {
@@ -211,6 +222,10 @@ void QuicSpdyStream::OnStreamHeaderList(bool fin,
}
}
+void QuicSpdyStream::OnHeadersTooLarge() {
+ Reset(QUIC_HEADERS_TOO_LARGE);
+}
+
void QuicSpdyStream::OnInitialHeadersComplete(bool fin, size_t /*frame_len*/) {
headers_decompressed_ = true;
if (fin) {
« no previous file with comments | « net/quic/core/quic_spdy_stream.h ('k') | net/quic/core/quic_spdy_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698