Skip to content
Snippets Groups Projects
Commit 942568bc authored by Craig Tiller's avatar Craig Tiller
Browse files

Better dictionary

parent 69b6d4ef
No related branches found
No related tags found
No related merge requests found
...@@ -89,3 +89,82 @@ ...@@ -89,3 +89,82 @@
"\x04vary" "\x04vary"
"\x03via" "\x03via"
"\x10www-authenticate" "\x10www-authenticate"
"\x00\x0Eaccept-charset\x00"
"\x00\x06accept\x00"
"\x00\x0Faccept-encoding\x00"
"\x00\x0Faccept-encoding\x0Dgzip, deflate"
"\x00\x0Faccept-language\x00"
"\x00\x0Daccept-ranges\x00"
"\x00\x1Baccess-control-allow-origin\x00"
"\x00\x03age\x00"
"\x00\x05allow\x00"
"\x00\x0A:authority\x00"
"\x00\x0Dauthorization\x00"
"\x00\x0Dcache-control\x00"
"\x00\x13content-disposition\x00"
"\x00\x10content-encoding\x00"
"\x00\x10content-language\x00"
"\x00\x0Econtent-length\x00"
"\x00\x10content-location\x00"
"\x00\x0Dcontent-range\x00"
"\x00\x0Ccontent-type\x10application/grpc"
"\x00\x0Ccontent-type\x00"
"\x00\x06cookie\x00"
"\x00\x04date\x00"
"\x00\x04etag\x00"
"\x00\x06expect\x00"
"\x00\x07expires\x00"
"\x00\x04from\x00"
"\x00\x14grpc-accept-encoding\x07deflate"
"\x00\x14grpc-accept-encoding\x0Cdeflate,gzip"
"\x00\x14grpc-accept-encoding\x04gzip"
"\x00\x14grpc-accept-encoding\x08identity"
"\x00\x14grpc-accept-encoding\x10identity,deflate"
"\x00\x14grpc-accept-encoding\x15identity,deflate,gzip"
"\x00\x14grpc-accept-encoding\x0Didentity,gzip"
"\x00\x0Dgrpc-encoding\x07deflate"
"\x00\x0Dgrpc-encoding\x04gzip"
"\x00\x0Dgrpc-encoding\x08identity"
"\x00\x0Bgrpc-status\x010"
"\x00\x0Bgrpc-status\x011"
"\x00\x0Bgrpc-status\x012"
"\x00\x04host\x00"
"\x00\x08if-match\x00"
"\x00\x11if-modified-since\x00"
"\x00\x0Dif-none-match\x00"
"\x00\x08if-range\x00"
"\x00\x13if-unmodified-since\x00"
"\x00\x0Dlast-modified\x00"
"\x00\x04link\x00"
"\x00\x08location\x00"
"\x00\x0Cmax-forwards\x00"
"\x00\x07:method\x03GET"
"\x00\x07:method\x04POST"
"\x00\x07:method\x03PUT"
"\x00\x05:path\x01/"
"\x00\x05:path\x0B/index.html"
"\x00\x12proxy-authenticate\x00"
"\x00\x13proxy-authorization\x00"
"\x00\x05range\x00"
"\x00\x07referer\x00"
"\x00\x07refresh\x00"
"\x00\x0Bretry-after\x00"
"\x00\x07:scheme\x04grpc"
"\x00\x07:scheme\x04http"
"\x00\x07:scheme\x05https"
"\x00\x06server\x00"
"\x00\x0Aset-cookie\x00"
"\x00\x07:status\x03200"
"\x00\x07:status\x03204"
"\x00\x07:status\x03206"
"\x00\x07:status\x03304"
"\x00\x07:status\x03400"
"\x00\x07:status\x03404"
"\x00\x07:status\x03500"
"\x00\x19strict-transport-security\x00"
"\x00\x02te\x08trailers"
"\x00\x11transfer-encoding\x00"
"\x00\x0Auser-agent\x00"
"\x00\x04vary\x00"
"\x00\x03via\x00"
"\x00\x10www-authenticate\x00"
...@@ -289,6 +289,9 @@ print >>C ...@@ -289,6 +289,9 @@ print >>C
print >>D, '# hpack fuzzing dictionary' print >>D, '# hpack fuzzing dictionary'
for i, elem in enumerate(all_strs): for i, elem in enumerate(all_strs):
print >>D, '%s' % (esc_dict([len(elem)] + [ord(c) for c in elem])) print >>D, '%s' % (esc_dict([len(elem)] + [ord(c) for c in elem]))
for i, elem in enumerate(all_elems):
print >>D, '%s' % (esc_dict([0, len(elem[0])] + [ord(c) for c in elem[0]] +
[len(elem[1])] + [ord(c) for c in elem[1]]))
print >>H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems) print >>H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems)
print >>H, 'extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];' print >>H, 'extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment