Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
ed43635c
Commit
ed43635c
authored
Oct 16, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated latest initial static header table
parent
50cdcca9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
68 deletions
+62
-68
lib/nghttp2_hd.c
lib/nghttp2_hd.c
+55
-61
tests/nghttp2_hd_test.c
tests/nghttp2_hd_test.c
+7
-7
No files found.
lib/nghttp2_hd.c
View file @
ed43635c
...
@@ -31,67 +31,61 @@
...
@@ -31,67 +31,61 @@
#include "nghttp2_helper.h"
#include "nghttp2_helper.h"
static
const
char
*
static_table
[]
=
{
static
const
char
*
static_table
[]
=
{
":scheme"
,
"http"
,
/* 0 */
":method"
,
"GET"
,
":scheme"
,
"https"
,
/* 1 */
":method"
,
"POST"
,
":host"
,
""
,
/* 2 */
":scheme"
,
"http"
,
":path"
,
"/"
,
/* 3 */
":scheme"
,
"https"
,
":method"
,
"GET"
,
/* 4 */
":path"
,
"/"
,
"accept"
,
""
,
/* 5 */
":status"
,
"200"
,
"accept-charset"
,
""
,
/* 6 */
":authority"
,
""
,
"accept-encoding"
,
""
,
/* 7 */
"accept-charset"
,
""
,
"accept-language"
,
""
,
/* 8 */
"accept-encoding"
,
""
,
"cookie"
,
""
,
/* 9 */
"accept-language"
,
""
,
"if-modified-since"
,
""
,
/* 10 */
"accept-ranges"
,
""
,
"user-agent"
,
""
,
/* 11 */
"accept"
,
""
,
"referer"
,
""
,
/* 12 */
"access-control-allow-origin"
,
""
,
"authorization"
,
""
,
/* 13 */
"age"
,
""
,
"allow"
,
""
,
/* 14 */
"allow"
,
""
,
"cache-control"
,
""
,
/* 15 */
"authorization"
,
""
,
"connection"
,
""
,
/* 16 */
"cache-control"
,
""
,
"content-length"
,
""
,
/* 17 */
"connection"
,
""
,
"content-type"
,
""
,
/* 18 */
"content-disposition"
,
""
,
"date"
,
""
,
/* 19 */
"content-encoding"
,
""
,
"expect"
,
""
,
/* 20 */
"content-language"
,
""
,
"from"
,
""
,
/* 21 */
"content-length"
,
""
,
"if-match"
,
""
,
/* 22 */
"content-location"
,
""
,
"if-none-match"
,
""
,
/* 23 */
"content-range"
,
""
,
"if-range"
,
""
,
/* 24 */
"content-type"
,
""
,
"if-unmodified-since"
,
""
,
/* 25 */
"cookie"
,
""
,
"max-forwards"
,
""
,
/* 26 */
"date"
,
""
,
"proxy-authorization"
,
""
,
/* 27 */
"etag"
,
""
,
"range"
,
""
,
/* 28 */
"expect"
,
""
,
"via"
,
""
,
/* 29 */
"expires"
,
""
,
/* 30 */
"from"
,
""
,
":status"
,
"200"
,
/* 31 */
"host"
,
""
,
"age"
,
""
,
/* 32 */
"if-match"
,
""
,
"cache-control"
,
""
,
/* 33 */
"if-modified-since"
,
""
,
"content-length"
,
""
,
/* 34 */
"if-none-match"
,
""
,
"content-type"
,
""
,
/* 35 */
"if-range"
,
""
,
"date"
,
""
,
/* 36 */
"if-unmodified-since"
,
""
,
"etag"
,
""
,
/* 37 */
"last-modified"
,
""
,
"expires"
,
""
,
/* 38 */
"link"
,
""
,
"last-modified"
,
""
,
/* 39 */
"location"
,
""
,
"server"
,
""
,
/* 40 */
"max-forwards"
,
""
,
"set-cookie"
,
""
,
/* 41 */
"proxy-authenticate"
,
""
,
"vary"
,
""
,
/* 42 */
"proxy-authorization"
,
""
,
"via"
,
""
,
/* 43 */
"range"
,
""
,
"access-control-allow-origin"
,
""
,
/* 44 */
"referer"
,
""
,
"accept-ranges"
,
""
,
/* 45 */
"refresh"
,
""
,
"allow"
,
""
,
/* 46 */
"retry-after"
,
""
,
"connection"
,
""
,
/* 47 */
"server"
,
""
,
"content-disposition"
,
""
,
/* 48 */
"set-cookie"
,
""
,
"content-encoding"
,
""
,
/* 49 */
"strict-transport-security"
,
""
,
"content-language"
,
""
,
/* 50 */
"transfer-encoding"
,
""
,
"content-location"
,
""
,
/* 51 */
"user-agent"
,
""
,
"content-range"
,
""
,
/* 52 */
"vary"
,
""
,
"link"
,
""
,
/* 53 */
"via"
,
""
,
"location"
,
""
,
/* 54 */
"www-authenticate"
,
""
,
"proxy-authenticate"
,
""
,
"refresh"
,
""
,
"retry-after"
,
""
,
"strict-transport-security"
,
""
,
"transfer-encoding"
,
""
,
"www-authenticate"
,
""
,
NULL
NULL
};
};
...
...
tests/nghttp2_hd_test.c
View file @
ed43635c
...
@@ -245,7 +245,7 @@ void test_nghttp2_hd_inflate_indname_inc(void)
...
@@ -245,7 +245,7 @@ void test_nghttp2_hd_inflate_indname_inc(void)
nghttp2_nv
*
resnva
;
nghttp2_nv
*
resnva
;
nghttp2_hd_inflate_init
(
&
inflater
,
NGHTTP2_HD_SIDE_SERVER
);
nghttp2_hd_inflate_init
(
&
inflater
,
NGHTTP2_HD_SIDE_SERVER
);
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
1
1
,
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
5
1
,
nv
.
value
,
nv
.
valuelen
,
1
,
nv
.
value
,
nv
.
valuelen
,
1
,
NGHTTP2_HD_SIDE_CLIENT
));
NGHTTP2_HD_SIDE_CLIENT
));
CU_ASSERT
(
1
==
nghttp2_hd_inflate_hd
(
&
inflater
,
&
resnva
,
buf
,
offset
));
CU_ASSERT
(
1
==
nghttp2_hd_inflate_hd
(
&
inflater
,
&
resnva
,
buf
,
offset
));
...
@@ -270,22 +270,22 @@ void test_nghttp2_hd_inflate_indname_inc_eviction(void)
...
@@ -270,22 +270,22 @@ void test_nghttp2_hd_inflate_indname_inc_eviction(void)
nghttp2_hd_inflate_init
(
&
inflater
,
NGHTTP2_HD_SIDE_SERVER
);
nghttp2_hd_inflate_init
(
&
inflater
,
NGHTTP2_HD_SIDE_SERVER
);
memset
(
value
,
'0'
,
sizeof
(
value
));
memset
(
value
,
'0'
,
sizeof
(
value
));
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
2
,
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
7
,
value
,
sizeof
(
value
),
1
,
value
,
sizeof
(
value
),
1
,
NGHTTP2_HD_SIDE_CLIENT
));
NGHTTP2_HD_SIDE_CLIENT
));
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
3
,
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
8
,
value
,
sizeof
(
value
),
1
,
value
,
sizeof
(
value
),
1
,
NGHTTP2_HD_SIDE_CLIENT
));
NGHTTP2_HD_SIDE_CLIENT
));
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
4
,
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
9
,
value
,
sizeof
(
value
),
1
,
value
,
sizeof
(
value
),
1
,
NGHTTP2_HD_SIDE_CLIENT
));
NGHTTP2_HD_SIDE_CLIENT
));
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
5
,
CU_ASSERT
(
0
==
nghttp2_hd_emit_indname_block
(
&
buf
,
&
buflen
,
&
offset
,
10
,
value
,
sizeof
(
value
),
1
,
value
,
sizeof
(
value
),
1
,
NGHTTP2_HD_SIDE_CLIENT
));
NGHTTP2_HD_SIDE_CLIENT
));
CU_ASSERT
(
4
==
nghttp2_hd_inflate_hd
(
&
inflater
,
&
resnva
,
buf
,
offset
));
CU_ASSERT
(
4
==
nghttp2_hd_inflate_hd
(
&
inflater
,
&
resnva
,
buf
,
offset
));
CU_ASSERT
(
5
==
resnva
[
0
].
namelen
);
CU_ASSERT
(
14
==
resnva
[
0
].
namelen
);
CU_ASSERT
(
0
==
memcmp
(
"
:hos
t"
,
resnva
[
0
].
name
,
resnva
[
0
].
namelen
));
CU_ASSERT
(
0
==
memcmp
(
"
accept-charse
t"
,
resnva
[
0
].
name
,
resnva
[
0
].
namelen
));
CU_ASSERT
(
sizeof
(
value
)
==
resnva
[
0
].
valuelen
);
CU_ASSERT
(
sizeof
(
value
)
==
resnva
[
0
].
valuelen
);
nghttp2_nv_array_del
(
resnva
);
nghttp2_nv_array_del
(
resnva
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment