diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-05 10:30:51 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-05 10:30:51 +0000 |
commit | 3aa4d8b81d9b2db4281cdf6b8bded40eacf1711e (patch) | |
tree | 504f32b1aa8b648cf1a5623207a48706673ee52b /net | |
parent | 2886f2d5738b62a7453b5543fa129cd2d148671f (diff) | |
download | chromium_src-3aa4d8b81d9b2db4281cdf6b8bded40eacf1711e.zip chromium_src-3aa4d8b81d9b2db4281cdf6b8bded40eacf1711e.tar.gz chromium_src-3aa4d8b81d9b2db4281cdf6b8bded40eacf1711e.tar.bz2 |
Fix HTTP/2 connection header prefix constant to not include null terminator
Rewrite it as an array of chars to emphasize that it's binary data.
This lands server change 50367344.
R=rch@chromium.org
Review URL: https://codereview.chromium.org/22061003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/spdy/spdy_protocol.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h index 8232c82..438d9d7 100644 --- a/net/spdy/spdy_protocol.h +++ b/net/spdy/spdy_protocol.h @@ -258,7 +258,14 @@ const int kV3DictionarySize = arraysize(kV3Dictionary); // The HTTP/2 connection header prefix, which must be the first bytes // sent by the client upon starting an HTTP/2 connection, and which // must be followed by a SETTINGS frame. -const char kHttp2ConnectionHeaderPrefix[] = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"; +// +// Equivalent to the string "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" +// (without the null terminator). +const char kHttp2ConnectionHeaderPrefix[] = { + 0x50, 0x52, 0x49, 0x20, 0x2a, 0x20, 0x48, 0x54, // PRI * HT + 0x54, 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x0d, 0x0a, // TP/2.0.. + 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... +}; const int kHttp2ConnectionHeaderPrefixSize = arraysize(kHttp2ConnectionHeaderPrefix); |