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

Side by Side Diff: net/spdy/chromium/spdy_session.cc

Issue 2974613002: Allow large response headers to buffer in HpackDecoder. (Closed)
Patch Set: 64MB --> 512KB Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « net/spdy/chromium/header_coalescer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/chromium/spdy_session.h" 5 #include "net/spdy/chromium/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 887
888 connection_ = std::move(connection); 888 connection_ = std::move(connection);
889 889
890 session_send_window_size_ = kDefaultInitialWindowSize; 890 session_send_window_size_ = kDefaultInitialWindowSize;
891 session_recv_window_size_ = kDefaultInitialWindowSize; 891 session_recv_window_size_ = kDefaultInitialWindowSize;
892 892
893 buffered_spdy_framer_ = base::MakeUnique<BufferedSpdyFramer>(net_log_); 893 buffered_spdy_framer_ = base::MakeUnique<BufferedSpdyFramer>(net_log_);
894 buffered_spdy_framer_->set_visitor(this); 894 buffered_spdy_framer_->set_visitor(this);
895 buffered_spdy_framer_->set_debug_visitor(this); 895 buffered_spdy_framer_->set_debug_visitor(this);
896 buffered_spdy_framer_->UpdateHeaderDecoderTableSize(max_header_table_size_); 896 buffered_spdy_framer_->UpdateHeaderDecoderTableSize(max_header_table_size_);
897 // Do not bother decoding response headers more than a factor over the limit.
898 buffered_spdy_framer_->set_max_decode_buffer_size_bytes(2 *
899 kMaxHeaderListSize);
Bence 2017/07/11 02:00:04 Nit: include header_coalescer.h for this.
897 900
898 net_log_.AddEvent(NetLogEventType::HTTP2_SESSION_INITIALIZED, 901 net_log_.AddEvent(NetLogEventType::HTTP2_SESSION_INITIALIZED,
899 base::Bind(&NetLogSpdyInitializedCallback, 902 base::Bind(&NetLogSpdyInitializedCallback,
900 connection_->socket()->NetLog().source())); 903 connection_->socket()->NetLog().source()));
901 904
902 DCHECK_EQ(availability_state_, STATE_AVAILABLE); 905 DCHECK_EQ(availability_state_, STATE_AVAILABLE);
903 connection_->AddHigherLayeredPool(this); 906 connection_->AddHigherLayeredPool(this);
904 if (enable_sending_initial_data_) 907 if (enable_sending_initial_data_)
905 SendInitialData(); 908 SendInitialData();
906 pool_ = pool; 909 pool_ = pool;
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after
3243 if (!queue->empty()) { 3246 if (!queue->empty()) {
3244 SpdyStreamId stream_id = queue->front(); 3247 SpdyStreamId stream_id = queue->front();
3245 queue->pop_front(); 3248 queue->pop_front();
3246 return stream_id; 3249 return stream_id;
3247 } 3250 }
3248 } 3251 }
3249 return 0; 3252 return 0;
3250 } 3253 }
3251 3254
3252 } // namespace net 3255 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/chromium/header_coalescer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698