| 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_CONSTANTS_H_ | 5 #ifndef NET_SPDY_HPACK_CONSTANTS_H_ |
| 6 #define NET_SPDY_HPACK_CONSTANTS_H_ | 6 #define NET_SPDY_HPACK_CONSTANTS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class HpackHuffmanTable; | 43 class HpackHuffmanTable; |
| 44 class HpackStaticTable; | 44 class HpackStaticTable; |
| 45 | 45 |
| 46 // Defined in RFC 7540 section 6.5.2. | 46 // Defined in RFC 7540 section 6.5.2. |
| 47 const uint32_t kDefaultHeaderTableSizeSetting = 4096; | 47 const uint32_t kDefaultHeaderTableSizeSetting = 4096; |
| 48 | 48 |
| 49 // Largest string literal an HpackDecoder/HpackEncoder will attempt to process | 49 // Largest string literal an HpackDecoder/HpackEncoder will attempt to process |
| 50 // before returning an error. | 50 // before returning an error. |
| 51 const uint32_t kDefaultMaxStringLiteralSize = 16 * 1024; | 51 const uint32_t kDefaultMaxStringLiteralSize = 256 * 1024; |
| 52 | 52 |
| 53 // Maximum amount of encoded header buffer HpackDecoder will retain before | 53 // Maximum amount of encoded header buffer HpackDecoder will retain before |
| 54 // returning an error. | 54 // returning an error. |
| 55 // TODO(jgraettinger): Remove with SpdyHeadersHandlerInterface switch. | 55 // TODO(jgraettinger): Remove with SpdyHeadersHandlerInterface switch. |
| 56 const uint32_t kMaxDecodeBufferSize = 32 * 1024; | 56 const uint32_t kMaxDecodeBufferSize = 256 * 1024; |
| 57 | 57 |
| 58 // 6.2: Flag for a string literal that is stored unmodified (i.e., | 58 // 6.2: Flag for a string literal that is stored unmodified (i.e., |
| 59 // without Huffman encoding). | 59 // without Huffman encoding). |
| 60 const HpackPrefix kStringLiteralIdentityEncoded = {0x0, 1}; | 60 const HpackPrefix kStringLiteralIdentityEncoded = {0x0, 1}; |
| 61 | 61 |
| 62 // 6.2: Flag for a Huffman-coded string literal. | 62 // 6.2: Flag for a Huffman-coded string literal. |
| 63 const HpackPrefix kStringLiteralHuffmanEncoded = {0x1, 1}; | 63 const HpackPrefix kStringLiteralHuffmanEncoded = {0x1, 1}; |
| 64 | 64 |
| 65 // 7.1: Opcode for an indexed header field. | 65 // 7.1: Opcode for an indexed header field. |
| 66 const HpackPrefix kIndexedOpcode = {0x1, 1}; | 66 const HpackPrefix kIndexedOpcode = {0x1, 1}; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 93 // The instance is read-only, has static lifetime, and is safe to share amoung | 93 // The instance is read-only, has static lifetime, and is safe to share amoung |
| 94 // threads. This function is thread-safe. | 94 // threads. This function is thread-safe. |
| 95 NET_EXPORT_PRIVATE const HpackStaticTable& ObtainHpackStaticTable(); | 95 NET_EXPORT_PRIVATE const HpackStaticTable& ObtainHpackStaticTable(); |
| 96 | 96 |
| 97 // Pseudo-headers start with a colon. (HTTP2 8.1.2.1., HPACK 3.1.) | 97 // Pseudo-headers start with a colon. (HTTP2 8.1.2.1., HPACK 3.1.) |
| 98 const char kPseudoHeaderPrefix = ':'; | 98 const char kPseudoHeaderPrefix = ':'; |
| 99 | 99 |
| 100 } // namespace net | 100 } // namespace net |
| 101 | 101 |
| 102 #endif // NET_SPDY_HPACK_CONSTANTS_H_ | 102 #endif // NET_SPDY_HPACK_CONSTANTS_H_ |
| OLD | NEW |