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

Side by Side Diff: net/spdy/buffered_spdy_framer.h

Issue 1566703002: Increase HTTP/2 response header buffer limit to 256 kB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #3. Created 4 years, 11 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 | « no previous file | net/spdy/buffered_spdy_framer.cc » ('j') | 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 #ifndef NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 5 #ifndef NET_SPDY_BUFFERED_SPDY_FRAMER_H_
6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return spdy_framer_.GetFrameMaximumSize(); 269 return spdy_framer_.GetFrameMaximumSize();
270 } 270 }
271 271
272 size_t GetDataFrameMaximumPayload() const { 272 size_t GetDataFrameMaximumPayload() const {
273 return spdy_framer_.GetDataFrameMaximumPayload(); 273 return spdy_framer_.GetDataFrameMaximumPayload();
274 } 274 }
275 275
276 int frames_received() const { return frames_received_; } 276 int frames_received() const { return frames_received_; }
277 277
278 private: 278 private:
279 // The size of the header_buffer_.
280 enum { kHeaderBufferSize = 32 * 1024 };
281
282 void InitHeaderStreaming(SpdyStreamId stream_id); 279 void InitHeaderStreaming(SpdyStreamId stream_id);
283 280
284 SpdyFramer spdy_framer_; 281 SpdyFramer spdy_framer_;
285 BufferedSpdyFramerVisitorInterface* visitor_; 282 BufferedSpdyFramerVisitorInterface* visitor_;
286 283
287 // Header block streaming state: 284 // Header block streaming state:
288 char header_buffer_[kHeaderBufferSize]; 285 std::string header_buffer_;
289 size_t header_buffer_used_;
290 bool header_buffer_valid_; 286 bool header_buffer_valid_;
291 SpdyStreamId header_stream_id_; 287 SpdyStreamId header_stream_id_;
292 int frames_received_; 288 int frames_received_;
293 289
294 // Collection of fields from control frames that we need to 290 // Collection of fields from control frames that we need to
295 // buffer up from the spdy framer. 291 // buffer up from the spdy framer.
296 struct ControlFrameFields { 292 struct ControlFrameFields {
297 SpdyFrameType type; 293 SpdyFrameType type;
298 SpdyStreamId stream_id; 294 SpdyStreamId stream_id;
299 SpdyStreamId associated_stream_id; 295 SpdyStreamId associated_stream_id;
(...skipping 14 matching lines...) Expand all
314 std::string debug_data; 310 std::string debug_data;
315 }; 311 };
316 scoped_ptr<GoAwayFields> goaway_fields_; 312 scoped_ptr<GoAwayFields> goaway_fields_;
317 313
318 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); 314 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer);
319 }; 315 };
320 316
321 } // namespace net 317 } // namespace net
322 318
323 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 319 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_
OLDNEW
« no previous file with comments | « no previous file | net/spdy/buffered_spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698