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

Side by Side Diff: net/spdy/hpack/hpack_decoder.h

Issue 2028473003: Move header-ordering validation from hpack decoder to header validator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lint errors. 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 unified diff | Download patch
« no previous file with comments | « net/spdy/header_coalescer.cc ('k') | net/spdy/hpack/hpack_decoder.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HPACK_DECODER_H_ 5 #ifndef NET_SPDY_HPACK_DECODER_H_
6 #define NET_SPDY_HPACK_DECODER_H_ 6 #define NET_SPDY_HPACK_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 std::string headers_block_buffer_; 107 std::string headers_block_buffer_;
108 SpdyHeaderBlock decoded_block_; 108 SpdyHeaderBlock decoded_block_;
109 109
110 // Scratch space for storing decoded literals. 110 // Scratch space for storing decoded literals.
111 std::string key_buffer_, value_buffer_; 111 std::string key_buffer_, value_buffer_;
112 112
113 // If non-NULL, handles decoded headers. 113 // If non-NULL, handles decoded headers.
114 SpdyHeadersHandlerInterface* handler_; 114 SpdyHeadersHandlerInterface* handler_;
115 size_t total_header_bytes_; 115 size_t total_header_bytes_;
116 116
117 // Flag to keep track of having seen a regular header field.
118 bool regular_header_seen_;
119
120 // Flag to keep track of having seen the header block start. 117 // Flag to keep track of having seen the header block start.
121 bool header_block_started_; 118 bool header_block_started_;
122 119
123 // Total bytes have been removed from headers_block_buffer_. 120 // Total bytes have been removed from headers_block_buffer_.
124 // Its value is updated during incremental decoding. 121 // Its value is updated during incremental decoding.
125 uint32_t total_parsed_bytes_; 122 uint32_t total_parsed_bytes_;
126 123
127 // How much encoded data this decoder is willing to buffer. 124 // How much encoded data this decoder is willing to buffer.
128 // Defaults to 256 KB. 125 // Defaults to 256 KB.
129 size_t max_decode_buffer_size_bytes_ = kMaxDecodeBufferSize; 126 size_t max_decode_buffer_size_bytes_ = kMaxDecodeBufferSize;
(...skipping 13 matching lines...) Expand all
143 bool DecodeNextStringLiteral(HpackInputStream* input_stream, 140 bool DecodeNextStringLiteral(HpackInputStream* input_stream,
144 bool is_header_key, // As distinct from a value. 141 bool is_header_key, // As distinct from a value.
145 base::StringPiece* output); 142 base::StringPiece* output);
146 143
147 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); 144 DISALLOW_COPY_AND_ASSIGN(HpackDecoder);
148 }; 145 };
149 146
150 } // namespace net 147 } // namespace net
151 148
152 #endif // NET_SPDY_HPACK_DECODER_H_ 149 #endif // NET_SPDY_HPACK_DECODER_H_
OLDNEW
« no previous file with comments | « net/spdy/header_coalescer.cc ('k') | net/spdy/hpack/hpack_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698