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

Unified Diff: net/quic/quic_headers_stream.cc

Issue 2104633002: Landing recent QUIC changes until 6/24/2016 14:00 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/quic_headers_stream.h ('k') | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_headers_stream.cc
diff --git a/net/quic/quic_headers_stream.cc b/net/quic/quic_headers_stream.cc
index 90b4d7c00aed7dbc718f70b19d55026f9f7bade1..72c3ac9bbefd189fae366cf501f64a5943cb0b53 100644
--- a/net/quic/quic_headers_stream.cc
+++ b/net/quic/quic_headers_stream.cc
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "net/quic/quic_bug_tracker.h"
#include "net/quic/quic_flags.h"
@@ -141,15 +142,32 @@ class QuicHeadersStream::SpdyFramerVisitor
}
void OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) override {
- CloseConnection("SPDY SETTINGS frame received.");
+ if (!FLAGS_quic_respect_http2_settings_frame) {
+ CloseConnection("SPDY SETTINGS frame received.");
+ return;
+ }
+ switch (id) {
+ case SETTINGS_HEADER_TABLE_SIZE:
+ stream_->UpdateHeaderEncoderTableSize(value);
+ break;
+ // TODO(fayang): Need to support SETTINGS_MAX_HEADER_LIST_SIZE when
+ // clients are actually sending it.
+ default:
+ CloseConnection("Unsupported field of HTTP/2 SETTINGS frame: " +
+ base::IntToString(id));
+ }
}
void OnSettingsAck() override {
- CloseConnection("SPDY SETTINGS frame received.");
+ if (!FLAGS_quic_respect_http2_settings_frame) {
+ CloseConnection("SPDY SETTINGS frame received.");
+ }
}
void OnSettingsEnd() override {
- CloseConnection("SPDY SETTINGS frame received.");
+ if (!FLAGS_quic_respect_http2_settings_frame) {
+ CloseConnection("SPDY SETTINGS frame received.");
+ }
}
void OnPing(SpdyPingId unique_id, bool is_ack) override {
@@ -484,4 +502,8 @@ void QuicHeadersStream::SetHpackDecoderDebugVisitor(
session()->connection()->helper()->GetClock(), std::move(visitor))));
}
+void QuicHeadersStream::UpdateHeaderEncoderTableSize(uint32_t value) {
+ spdy_framer_.UpdateHeaderEncoderTableSize(value);
+}
+
} // namespace net
« no previous file with comments | « net/quic/quic_headers_stream.h ('k') | net/quic/quic_headers_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698