| OLD | NEW |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Note that this may be too accomodating, as the sender's HTTP2 layer | 88 // Note that this may be too accomodating, as the sender's HTTP2 layer |
| 89 // should have already joined and delimited these values. | 89 // should have already joined and delimited these values. |
| 90 // | 90 // |
| 91 // Returns false if a pseudo-header field follows a regular header one, which | 91 // Returns false if a pseudo-header field follows a regular header one, which |
| 92 // MUST be treated as malformed, as per sections 8.1.2.3. of the HTTP2 | 92 // MUST be treated as malformed, as per sections 8.1.2.3. of the HTTP2 |
| 93 // specification (RFC 7540). | 93 // specification (RFC 7540). |
| 94 // | 94 // |
| 95 bool HandleHeaderRepresentation(base::StringPiece name, | 95 bool HandleHeaderRepresentation(base::StringPiece name, |
| 96 base::StringPiece value); | 96 base::StringPiece value); |
| 97 | 97 |
| 98 const uint32_t max_string_literal_size_; | |
| 99 HpackHeaderTable header_table_; | 98 HpackHeaderTable header_table_; |
| 100 | 99 |
| 101 // TODO(jgraettinger): Buffer for headers data, and storage for the last- | 100 // TODO(jgraettinger): Buffer for headers data, and storage for the last- |
| 102 // processed headers block. Both will be removed with the switch to | 101 // processed headers block. Both will be removed with the switch to |
| 103 // SpdyHeadersHandlerInterface. | 102 // SpdyHeadersHandlerInterface. |
| 104 std::string headers_block_buffer_; | 103 std::string headers_block_buffer_; |
| 105 SpdyHeaderBlock decoded_block_; | 104 SpdyHeaderBlock decoded_block_; |
| 106 | 105 |
| 107 // Scratch space for storing decoded literals. | 106 // Scratch space for storing decoded literals. |
| 108 std::string key_buffer_, value_buffer_; | 107 std::string key_buffer_, value_buffer_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 136 bool DecodeNextStringLiteral(HpackInputStream* input_stream, | 135 bool DecodeNextStringLiteral(HpackInputStream* input_stream, |
| 137 bool is_header_key, // As distinct from a value. | 136 bool is_header_key, // As distinct from a value. |
| 138 base::StringPiece* output); | 137 base::StringPiece* output); |
| 139 | 138 |
| 140 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); | 139 DISALLOW_COPY_AND_ASSIGN(HpackDecoder); |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 } // namespace net | 142 } // namespace net |
| 144 | 143 |
| 145 #endif // NET_SPDY_HPACK_DECODER_H_ | 144 #endif // NET_SPDY_HPACK_DECODER_H_ |
| OLD | NEW |