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

Unified Diff: net/spdy/hpack_constants.h

Issue 265763011: Land recent SPDY changes (through 66310528) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util_test.cc ('k') | net/spdy/hpack_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/hpack_constants.h
diff --git a/net/spdy/hpack_constants.h b/net/spdy/hpack_constants.h
index 577837ec53899cb8210c64b83b8242b28e45b854..7b3051631fa773db1838e23fd5dfa64be674cf33 100644
--- a/net/spdy/hpack_constants.h
+++ b/net/spdy/hpack_constants.h
@@ -11,7 +11,7 @@
#include "net/base/net_export.h"
// All section references below are to
-// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-06
+// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07
namespace net {
@@ -42,37 +42,36 @@ const uint32 kDefaultMaxStringLiteralSize = 16 * 1024;
// TODO(jgraettinger): Remove with SpdyHeadersHandlerInterface switch.
const uint32 kMaxDecodeBufferSize = 32 * 1024;
-// The marker for a string literal that is stored unmodified (i.e.,
-// without Huffman encoding) (from 4.1.2).
+// 4.1.2: Flag for a string literal that is stored unmodified (i.e.,
+// without Huffman encoding).
const HpackPrefix kStringLiteralIdentityEncoded = { 0x0, 1 };
-// The marker for a string literal that is stored with Huffman
-// encoding (from 4.1.2).
+// 4.1.2: Flag for a Huffman-coded string literal.
const HpackPrefix kStringLiteralHuffmanEncoded = { 0x1, 1 };
-// The opcode for an encoding context update (from 4.2).
-// This is an indexed header representation with special index zero,
-// and as such this opcode must be tested prior to |kIndexedOpcode|.
-const HpackPrefix kEncodingContextOpcode = { 0x80, 8 };
+// 4.2: Opcode for an indexed header field.
+const HpackPrefix kIndexedOpcode = { 0x1, 1 };
-// Follows an |kEncodingContextOpcode| to indicate the reference set should be
-// cleared. (Section 4.4).
-const HpackPrefix kEncodingContextEmptyReferenceSet = { 0x80, 8 };
+// 4.3.1: Opcode for a literal header field with incremental indexing.
+const HpackPrefix kLiteralIncrementalIndexOpcode = { 0x1, 2 };
-// Follows an |kEncodingContextOpcode| to indicate the encoder is using a new
-// maximum headers table size. (Section 4.4).
-const HpackPrefix kEncodingContextNewMaximumSize = { 0x0, 1 };
+// 4.3.2: Opcode for a literal header field without indexing.
+const HpackPrefix kLiteralNoIndexOpcode = { 0x0, 4 };
-// The opcode for an indexed header field (from 4.2).
-const HpackPrefix kIndexedOpcode = { 0x1, 1 };
+// 4.3.3: Opcode for a literal header field which is never indexed.
+const HpackPrefix kLiteralNeverIndexOpcode = { 0x1, 4 };
-// The opcode for a literal header field without indexing (from
-// 4.3.1).
-const HpackPrefix kLiteralNoIndexOpcode = { 0x01, 2 };
+// 4.4: Opcode for an encoding context update.
+const HpackPrefix kEncodingContextOpcode = { 0x1, 3 };
-// The opcode for a literal header field with incremental indexing
-// (from 4.3.2).
-const HpackPrefix kLiteralIncrementalIndexOpcode = { 0x00, 2 };
+// 4.4: Flag following an |kEncodingContextOpcode|, which indicates
+// the reference set should be cleared.
+const HpackPrefix kEncodingContextEmptyReferenceSet = { 0x10, 5 };
+
+// 4.4: Flag following an |kEncodingContextOpcode|, which indicates
+// the encoder is using a new maximum headers table size. Begins a
+// varint-encoded table size with a 4-bit prefix.
+const HpackPrefix kEncodingContextNewMaximumSize = { 0x0, 1 };
// Returns symbol code table from "Appendix C. Huffman Codes".
NET_EXPORT_PRIVATE std::vector<HpackHuffmanSymbol> HpackHuffmanCode();
« no previous file with comments | « net/spdy/fuzzing/hpack_fuzz_util_test.cc ('k') | net/spdy/hpack_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698