Commit 0dfba7c5 authored by bnc's avatar bnc Committed by Commit bot

Add SpdyFramer methods for SETTINGS_HEADER_TABLE_SIZE.

This CL lands server change 90723544 by yinjie.

BUG=488484

Review URL: https://codereview.chromium.org/1146533003

Cr-Commit-Position: refs/heads/master@{#330161}
parent a600722d
...@@ -161,7 +161,8 @@ SpdyFramer::SpdyFramer(SpdyMajorVersion version) ...@@ -161,7 +161,8 @@ SpdyFramer::SpdyFramer(SpdyMajorVersion version)
enable_compression_(true), enable_compression_(true),
syn_frame_processed_(false), syn_frame_processed_(false),
probable_http_response_(false), probable_http_response_(false),
end_stream_when_done_(false) { end_stream_when_done_(false),
header_table_size_bound_(4096) {
DCHECK_GE(protocol_version_, SPDY_MIN_VERSION); DCHECK_GE(protocol_version_, SPDY_MIN_VERSION);
DCHECK_LE(protocol_version_, SPDY_MAX_VERSION); DCHECK_LE(protocol_version_, SPDY_MAX_VERSION);
DCHECK_LE(kMaxControlFrameSize, DCHECK_LE(kMaxControlFrameSize,
...@@ -3201,6 +3202,17 @@ bool SpdyFramer::IncrementallyDeliverControlFrameHeaderData( ...@@ -3201,6 +3202,17 @@ bool SpdyFramer::IncrementallyDeliverControlFrameHeaderData(
return read_successfully; return read_successfully;
} }
void SpdyFramer::UpdateHeaderTableSizeSetting(uint32 value) {
header_table_size_bound_ = value;
GetHpackEncoder()->ApplyHeaderTableSizeSetting(value);
GetHpackDecoder()->ApplyHeaderTableSizeSetting(value);
}
// Return size bound of the header compression table.
size_t SpdyFramer::header_table_size_bound() const {
return header_table_size_bound_;
}
void SpdyFramer::SerializeNameValueBlockWithoutCompression( void SpdyFramer::SerializeNameValueBlockWithoutCompression(
SpdyFrameBuilder* builder, SpdyFrameBuilder* builder,
const SpdyNameValueBlock& name_value_block) const { const SpdyNameValueBlock& name_value_block) const {
......
...@@ -590,6 +590,12 @@ class NET_EXPORT_PRIVATE SpdyFramer { ...@@ -590,6 +590,12 @@ class NET_EXPORT_PRIVATE SpdyFramer {
const char* data, const char* data,
size_t len); size_t len);
// Updates the maximum size of header compression table.
void UpdateHeaderTableSizeSetting(uint32 value);
// Returns bound of header compression table size.
size_t header_table_size_bound() const;
protected: protected:
// TODO(jgraettinger): Switch to test peer pattern. // TODO(jgraettinger): Switch to test peer pattern.
FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, BasicCompression); FRIEND_TEST_ALL_PREFIXES(SpdyFramerTest, BasicCompression);
...@@ -805,6 +811,9 @@ class NET_EXPORT_PRIVATE SpdyFramer { ...@@ -805,6 +811,9 @@ class NET_EXPORT_PRIVATE SpdyFramer {
// we know to terminate the stream when the entire header block has been // we know to terminate the stream when the entire header block has been
// processed. // processed.
bool end_stream_when_done_; bool end_stream_when_done_;
// Last acknowledged value for SETTINGS_HEADER_TABLE_SIZE.
size_t header_table_size_bound_;
}; };
} // namespace net } // namespace net
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment