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
e5e4fc9d
Commit
e5e4fc9d
authored
Nov 19, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp2_hd: Define some headers not for indexing based on our research
parent
b71bb6dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
lib/nghttp2_hd.c
lib/nghttp2_hd.c
+20
-1
No files found.
lib/nghttp2_hd.c
View file @
e5e4fc9d
...
...
@@ -984,6 +984,24 @@ nghttp2_hd_entry* nghttp2_hd_table_get(nghttp2_hd_context *context,
}
}
#define name_match(NV, NAME) \
(nv->namelen == sizeof(NAME) - 1 && \
memcmp(nv->name, NAME, sizeof(NAME) - 1) == 0)
static
int
should_indexing
(
const
nghttp2_nv
*
nv
)
{
#ifdef NGHTTP2_XHD
return
!
name_match
(
nv
,
NGHTTP2_XHD
);
#else
/* !NGHTTP2_XHD */
return
!
name_match
(
nv
,
"set-cookie"
)
&&
!
name_match
(
nv
,
"content-length"
)
&&
!
name_match
(
nv
,
"location"
)
&&
!
name_match
(
nv
,
"etag"
)
&&
!
name_match
(
nv
,
":path"
);
#endif
/* !NGHTTP2_XHD */
}
static
int
deflate_nv
(
nghttp2_hd_context
*
deflater
,
uint8_t
**
buf_ptr
,
size_t
*
buflen_ptr
,
size_t
*
offset_ptr
,
...
...
@@ -1064,7 +1082,8 @@ static int deflate_nv(nghttp2_hd_context *deflater,
if
(
rv
!=
-
1
)
{
index
=
rv
;
}
if
(
entry_room
(
nv
->
namelen
,
nv
->
valuelen
)
<=
NGHTTP2_HD_MAX_ENTRY_SIZE
)
{
if
(
should_indexing
(
nv
)
&&
entry_room
(
nv
->
namelen
,
nv
->
valuelen
)
<=
NGHTTP2_HD_MAX_ENTRY_SIZE
)
{
nghttp2_hd_entry
*
new_ent
;
if
(
index
>=
(
ssize_t
)
deflater
->
hd_table
.
len
)
{
nghttp2_nv
nv_indname
;
...
...
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