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
01266182
Commit
01266182
authored
Dec 17, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp2_hd: Match deflate_hd_tablelen to hd_table.len on decoder side
parent
595493a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
lib/nghttp2_hd.c
lib/nghttp2_hd.c
+4
-3
lib/nghttp2_hd.h
lib/nghttp2_hd.h
+2
-1
No files found.
lib/nghttp2_hd.c
View file @
01266182
...
...
@@ -293,7 +293,8 @@ int nghttp2_hd_deflate_init2(nghttp2_hd_context *deflater,
int
nghttp2_hd_inflate_init
(
nghttp2_hd_context
*
inflater
,
nghttp2_hd_side
side
)
{
return
nghttp2_hd_context_init
(
inflater
,
NGHTTP2_HD_ROLE_INFLATE
,
side
,
0
);
return
nghttp2_hd_context_init
(
inflater
,
NGHTTP2_HD_ROLE_INFLATE
,
side
,
NGHTTP2_HD_DEFAULT_MAX_BUFFER_SIZE
);
}
static
void
nghttp2_hd_context_free
(
nghttp2_hd_context
*
context
)
...
...
@@ -901,9 +902,9 @@ static nghttp2_hd_entry* add_hd_table_incremental(nghttp2_hd_context *context,
--
new_ent
->
ref
;
}
else
{
context
->
hd_table_bufsize
+=
room
;
new_ent
->
flags
|=
NGHTTP2_HD_FLAG_REFSET
;
nghttp2_hd_ringbuf_push_front
(
&
context
->
hd_table
,
new_ent
);
if
(
room
<=
context
->
deflate_hd_table_bufsize_max
)
{
new_ent
->
flags
|=
NGHTTP2_HD_FLAG_REFSET
;
context
->
deflate_hd_table_bufsize
+=
room
;
++
context
->
deflate_hd_tablelen
;
}
...
...
@@ -1195,7 +1196,7 @@ ssize_t nghttp2_hd_deflate_hd(nghttp2_hd_context *deflater,
goto
fail
;
}
}
for
(
i
=
0
;
i
<
deflater
->
hd_table
.
len
;
++
i
)
{
for
(
i
=
0
;
i
<
deflater
->
deflate_hd_table
len
;
++
i
)
{
nghttp2_hd_entry
*
ent
=
nghttp2_hd_ringbuf_get
(
&
deflater
->
hd_table
,
i
);
rv
=
deflate_post_process_hd_entry
(
ent
,
i
,
buf_ptr
,
buflen_ptr
,
&
offset
);
if
(
rv
!=
0
)
{
...
...
lib/nghttp2_hd.h
View file @
01266182
...
...
@@ -116,7 +116,8 @@ typedef struct {
entries. This value is always equal to |hd_table_bufsize_max| on
decoder context. */
size_t
deflate_hd_table_bufsize_max
;
/* The number of effective entry in |hd_table|. */
/* The number of effective entry in |hd_table|. This value is always
equal to hd_table.len on decoder side. */
size_t
deflate_hd_tablelen
;
/* The number of entry the |buf_track| contains. */
size_t
buf_tracklen
;
...
...
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