QuicSpdySessionPeer::SetMaxInboundHeaderListSize()
Replace QuicSpdySessionPeer::SetMaxUncompressedHeaderBytes() method
calling QuicSpdySession::set_max_uncompressed_header_bytes() with
QuicSpdySessionPeer::SetMaxInboundHeaderListSize() method calling
QuicSpdySession::set_max_inbound_header_list_size().
This will need to be called before QuicSpdySession::Initialize() to take
effect. Change QuicHeadersStreamTest accordingly.
gfe-relnote: n/a, test-only change.
PiperOrigin-RevId: 257100630
Change-Id: I3050b00ec42e7aa50057b8343424db98d6984afe
diff --git a/quic/core/http/quic_headers_stream_test.cc b/quic/core/http/quic_headers_stream_test.cc
index 3b536ef..ebfa6cc 100644
--- a/quic/core/http/quic_headers_stream_test.cc
+++ b/quic/core/http/quic_headers_stream_test.cc
@@ -188,6 +188,7 @@
/*offset=*/0,
""),
next_promised_stream_id_(2) {
+ QuicSpdySessionPeer::SetMaxInboundHeaderListSize(&session_, 256 * 1024);
session_.Initialize();
headers_stream_ = QuicSpdySessionPeer::GetHeadersStream(&session_);
headers_[":version"] = "HTTP/1.1";
@@ -569,7 +570,6 @@
return;
}
- QuicSpdySessionPeer::SetMaxUncompressedHeaderBytes(&session_, 256 * 1024);
// We want to create a frame that is more than the SPDY Framer's max control
// frame size, which is 16K, but less than the HPACK decoders max decode
// buffer size, which is 32K.
diff --git a/quic/core/http/quic_spdy_session.h b/quic/core/http/quic_spdy_session.h
index 93f121c..0a009bf 100644
--- a/quic/core/http/quic_spdy_session.h
+++ b/quic/core/http/quic_spdy_session.h
@@ -166,6 +166,8 @@
void CloseConnectionWithDetails(QuicErrorCode error,
const std::string& details);
+ // Must be called before Initialize().
+ // TODO(bnc): Move to constructor argument.
void set_max_inbound_header_list_size(size_t max_inbound_header_list_size) {
max_inbound_header_list_size_ = max_inbound_header_list_size;
}