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
e496800c
Commit
e496800c
authored
Jul 26, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix header compression bug
parent
48d7453a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
56 deletions
+91
-56
lib/nghttp2_hd.c
lib/nghttp2_hd.c
+83
-52
lib/nghttp2_hd.h
lib/nghttp2_hd.h
+4
-0
tests/nghttp2_hd_test.c
tests/nghttp2_hd_test.c
+4
-4
No files found.
lib/nghttp2_hd.c
View file @
e496800c
This diff is collapsed.
Click to expand it.
lib/nghttp2_hd.h
View file @
e496800c
...
...
@@ -113,6 +113,10 @@ typedef struct {
is the sum of length of name/value in hd_table +
NGHTTP2_HD_ENTRY_OVERHEAD bytes overhead per each entry. */
uint16_t
hd_table_bufsize
;
/* If inflate/deflate error occurred, this value is set to 1 and
further invocation of inflate/deflate will fail with
NGHTTP2_ERR_HEADER_COMP. */
uint8_t
bad
;
}
nghttp2_hd_context
;
/*
...
...
tests/nghttp2_hd_test.c
View file @
e496800c
...
...
@@ -51,9 +51,9 @@ void test_nghttp2_hd_deflate(void)
MAKE_NV
(
"hello"
,
"world"
)};
nghttp2_nv
nva2
[]
=
{
MAKE_NV
(
":path"
,
"/script.js"
),
MAKE_NV
(
":scheme"
,
"https"
)};
nghttp2_nv
nva3
[]
=
{
MAKE_NV
(
"
:path"
,
"/style.css
"
),
MAKE_NV
(
"cookie"
,
"k
1=v1
"
),
MAKE_NV
(
"
cookie"
,
"k2=v2
"
)};
nghttp2_nv
nva3
[]
=
{
MAKE_NV
(
"
cookie"
,
"k1=v1
"
),
MAKE_NV
(
"cookie"
,
"k
2=v2
"
),
MAKE_NV
(
"
via"
,
"proxy
"
)};
nghttp2_nv
nva4
[]
=
{
MAKE_NV
(
":path"
,
"/style.css"
),
MAKE_NV
(
"cookie"
,
"k1=v1"
),
MAKE_NV
(
"cookie"
,
"k1=v1"
)};
...
...
@@ -116,7 +116,7 @@ void test_nghttp2_hd_deflate(void)
encode duplicates. Only first one is encoded. */
blocklen
=
nghttp2_hd_deflate_hd
(
&
deflater
,
&
buf
,
&
buflen
,
nv_offset
,
nva4
,
sizeof
(
nva4
)
/
sizeof
(
nghttp2_nv
));
CU_ASSERT
(
blocklen
==
0
);
CU_ASSERT
(
blocklen
>
0
);
nghttp2_hd_end_headers
(
&
deflater
);
CU_ASSERT
(
2
==
nghttp2_hd_inflate_hd
(
&
inflater
,
&
resnva
,
buf
+
nv_offset
,
...
...
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