Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
69b6d4ef
Commit
69b6d4ef
authored
Apr 18, 2016
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Better dictionary
parent
134a6b6f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/core/end2end/fuzzers/hpack.dictionary
+90
-90
90 additions, 90 deletions
test/core/end2end/fuzzers/hpack.dictionary
tools/codegen/core/gen_static_metadata.py
+3
-8
3 additions, 8 deletions
tools/codegen/core/gen_static_metadata.py
with
93 additions
and
98 deletions
test/core/end2end/fuzzers/hpack.dictionary
+
90
−
90
View file @
69b6d4ef
# hpack fuzzing dictionary
kw0=
"\x01
""
0"
kw1=
"\x01
""
1"
kw2=
"\x01
""
2"
kw3=
"\x03
""
200"
kw4=
"\x03
""
204"
kw5=
"\x03
""
206"
kw6=
"\x03
""
304"
kw7=
"\x03
""
400"
kw8=
"\x03
""
404"
kw9=
"\x03
""
500"
kw10=
"\x06
""
accept"
kw11=
"\x0
e""
accept-charset"
kw12=
"\x0
f""
accept-encoding"
kw13=
"\x0
f""
accept-language"
kw14=
"\x0
d""
accept-ranges"
kw15=
"\x1
b""
access-control-allow-origin"
kw16=
"\x03
""
age"
kw17=
"\x05
""
allow"
kw18=
"\x10
""
application/grpc"
kw19=
"\x0
a
:authority"
kw20=
"\x0
d""
authorization"
kw21=
"\x0
d""
cache-control"
kw22=
"\x0
a""
census-bin"
kw23=
"\x11
""
census-binary-bin"
kw24=
"\x13
""
content-disposition"
kw25=
"\x10
""
content-encoding"
kw26=
"\x10
""
content-language"
kw27=
"\x0
e""
content-length"
kw28=
"\x10
""
content-location"
kw29=
"\x0
d""
content-range"
kw30=
"\x0
c""
content-type"
kw31=
"\x06
""
cookie"
kw32=
"\x04
""
date"
kw33=
"\x07
""
deflate"
kw34=
"\x0
c""
deflate,gzip"
kw35=
"\x00"
kw36=
"\x04
""
etag"
kw37=
"\x06
""
expect"
kw38=
"\x07
""
expires"
kw39=
"\x04
""
from"
kw40=
"\x03GET"
kw41=
"\x04grpc"
kw42=
"\x14grpc-accept-encoding"
kw43=
"\x0
d
grpc-encoding"
kw44=
"\x1
e
grpc-internal-encoding-request"
kw45=
"\x0
c
grpc-message"
kw46=
"\x0
b
grpc-status"
kw47=
"\x0
c
grpc-timeout"
kw48=
"\x04gzip"
kw49=
"\x0
d
gzip, deflate"
kw50=
"\x04host"
kw51=
"\x04http"
kw52=
"\x05https"
kw53=
"\x08identity"
kw54=
"\x10identity,deflate"
kw55=
"\x15identity,deflate,gzip"
kw56=
"\x0
d
identity,gzip"
kw57=
"\x08if-match"
kw58=
"\x11if-modified-since"
kw59=
"\x0
d
if-none-match"
kw60=
"\x08if-range"
kw61=
"\x13if-unmodified-since"
kw62=
"\x0
d
last-modified"
kw63=
"\x04link"
kw64=
"\x08location"
kw65=
"\x0
c
max-forwards"
kw66=
"\x07:method"
kw67=
"\x05:path"
kw68=
"\x04POST"
kw69=
"\x12proxy-authenticate"
kw70=
"\x13proxy-authorization"
kw71=
"\x03PUT"
kw72=
"\x05range"
kw73=
"\x07referer"
kw74=
"\x07refresh"
kw75=
"\x0
b
retry-after"
kw76=
"\x07:scheme"
kw77=
"\x06server"
kw78=
"\x0
a
set-cookie"
kw79=
"\x01/"
kw80=
"\x0
b
/index.html"
kw81=
"\x07:status"
kw82=
"\x19strict-transport-security"
kw83=
"\x02te"
kw84=
"\x08trailers"
kw85=
"\x11transfer-encoding"
kw86=
"\x0
a
user-agent"
kw87=
"\x04vary"
kw88=
"\x03via"
kw89=
"\x10www-authenticate"
"\x010"
"\x011"
"\x012"
"\x03200"
"\x03204"
"\x03206"
"\x03304"
"\x03400"
"\x03404"
"\x03500"
"\x06accept"
"\x0
E
accept-charset"
"\x0
F
accept-encoding"
"\x0
F
accept-language"
"\x0
D
accept-ranges"
"\x1
B
access-control-allow-origin"
"\x03age"
"\x05allow"
"\x10application/grpc"
"\x0
A
:authority"
"\x0
D
authorization"
"\x0
D
cache-control"
"\x0
A
census-bin"
"\x11census-binary-bin"
"\x13content-disposition"
"\x10content-encoding"
"\x10content-language"
"\x0
E
content-length"
"\x10content-location"
"\x0
D
content-range"
"\x0
C
content-type"
"\x06cookie"
"\x04date"
"\x07deflate"
"\x0
C
deflate,gzip"
"\x00"
"\x04etag"
"\x06expect"
"\x07expires"
"\x04from"
"\x03GET"
"\x04grpc"
"\x14grpc-accept-encoding"
"\x0
D
grpc-encoding"
"\x1
E
grpc-internal-encoding-request"
"\x0
C
grpc-message"
"\x0
B
grpc-status"
"\x0
C
grpc-timeout"
"\x04gzip"
"\x0
D
gzip, deflate"
"\x04host"
"\x04http"
"\x05https"
"\x08identity"
"\x10identity,deflate"
"\x15identity,deflate,gzip"
"\x0
D
identity,gzip"
"\x08if-match"
"\x11if-modified-since"
"\x0
D
if-none-match"
"\x08if-range"
"\x13if-unmodified-since"
"\x0
D
last-modified"
"\x04link"
"\x08location"
"\x0
C
max-forwards"
"\x07:method"
"\x05:path"
"\x04POST"
"\x12proxy-authenticate"
"\x13proxy-authorization"
"\x03PUT"
"\x05range"
"\x07referer"
"\x07refresh"
"\x0
B
retry-after"
"\x07:scheme"
"\x06server"
"\x0
A
set-cookie"
"\x01/"
"\x0
B
/index.html"
"\x07:status"
"\x19strict-transport-security"
"\x02te"
"\x08trailers"
"\x11transfer-encoding"
"\x0
A
user-agent"
"\x04vary"
"\x03via"
"\x10www-authenticate"
This diff is collapsed.
Click to expand it.
tools/codegen/core/gen_static_metadata.py
+
3
−
8
View file @
69b6d4ef
...
...
@@ -246,21 +246,16 @@ with open(sys.argv[0]) as my_source:
hex_bytes
=
[
ord
(
c
)
for
c
in
"
abcdefABCDEF0123456789
"
]
def
esc_
c
(
line
):
def
esc_
dict
(
line
):
out
=
"
\"
"
last_was_hex
=
False
for
c
in
line
:
if
32
<=
c
<
127
:
if
c
in
hex_bytes
and
last_was_hex
:
out
+=
"
\"\"
"
if
c
!=
ord
(
'"'
):
out
+=
chr
(
c
)
else
:
out
+=
"
\\\"
"
last_was_hex
=
False
else
:
out
+=
"
\\
x%02x
"
%
c
last_was_hex
=
True
out
+=
"
\\
x%02X
"
%
c
return
out
+
"
\"
"
put_banner
([
H
,
C
],
...
...
@@ -293,7 +288,7 @@ print >>C
print
>>
D
,
'
# hpack fuzzing dictionary
'
for
i
,
elem
in
enumerate
(
all_strs
):
print
>>
D
,
'
kw%d=
%s
'
%
(
i
,
esc_
c
([
len
(
elem
)]
+
[
ord
(
c
)
for
c
in
elem
]))
print
>>
D
,
'
%s
'
%
(
esc_
dict
([
len
(
elem
)]
+
[
ord
(
c
)
for
c
in
elem
]))
print
>>
H
,
'
#define GRPC_STATIC_MDELEM_COUNT %d
'
%
len
(
all_elems
)
print
>>
H
,
'
extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment