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
a2117539
Commit
a2117539
authored
Feb 21, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test to verify that deflater can handle initial buf smaller than default
parent
6c51bd09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
tests/nghttp2_hd_test.c
tests/nghttp2_hd_test.c
+22
-0
No files found.
tests/nghttp2_hd_test.c
View file @
a2117539
...
...
@@ -678,6 +678,28 @@ void test_nghttp2_hd_change_table_size(void)
nva_out_reset
(
&
out
);
nghttp2_hd_inflate_free
(
&
inflater
);
nghttp2_hd_deflate_free
(
&
deflater
);
/* Check that encoder can handle the case where its allowable buffer
size is less than default size, 4096 */
nghttp2_hd_deflate_init2
(
&
deflater
,
1024
);
nghttp2_hd_inflate_init
(
&
inflater
);
CU_ASSERT
(
127
==
deflater
.
ctx
.
hd_table
.
mask
);
CU_ASSERT
(
4096
==
deflater
.
ctx
.
hd_table_bufsize_max
);
/* This emits context update with buffer size 1024 */
rv
=
nghttp2_hd_deflate_hd
(
&
deflater
,
&
buf
,
&
buflen
,
0
,
nva
,
2
);
CU_ASSERT
(
rv
>
0
);
CU_ASSERT
(
2
==
deflater
.
ctx
.
hd_table
.
len
);
CU_ASSERT
(
1024
==
deflater
.
ctx
.
hd_table_bufsize_max
);
CU_ASSERT
(
rv
==
inflate_hd
(
&
inflater
,
&
out
,
buf
,
rv
));
CU_ASSERT
(
2
==
inflater
.
ctx
.
hd_table
.
len
);
CU_ASSERT
(
1024
==
inflater
.
ctx
.
hd_table_bufsize_max
);
CU_ASSERT
(
4096
==
inflater
.
settings_hd_table_bufsize_max
);
free
(
buf
);
nghttp2_hd_inflate_free
(
&
inflater
);
nghttp2_hd_deflate_free
(
&
deflater
);
...
...
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