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
50f42a80
Commit
50f42a80
authored
Nov 18, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Fix bug that mishandles response header from h1 backend
parent
00bd76fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
src/shrpx_http_downstream_connection.cc
src/shrpx_http_downstream_connection.cc
+2
-7
No files found.
src/shrpx_http_downstream_connection.cc
View file @
50f42a80
...
@@ -819,7 +819,6 @@ int htp_hdr_keycb(http_parser *htp, const char *data, size_t len) {
...
@@ -819,7 +819,6 @@ int htp_hdr_keycb(http_parser *htp, const char *data, size_t len) {
auto
downstream
=
static_cast
<
Downstream
*>
(
htp
->
data
);
auto
downstream
=
static_cast
<
Downstream
*>
(
htp
->
data
);
auto
&
resp
=
downstream
->
response
();
auto
&
resp
=
downstream
->
response
();
auto
&
httpconf
=
get_config
()
->
http
;
auto
&
httpconf
=
get_config
()
->
http
;
auto
&
balloc
=
downstream
->
get_block_allocator
();
if
(
ensure_header_field_buffer
(
downstream
,
httpconf
,
len
)
!=
0
)
{
if
(
ensure_header_field_buffer
(
downstream
,
httpconf
,
len
)
!=
0
)
{
return
-
1
;
return
-
1
;
...
@@ -832,9 +831,7 @@ int htp_hdr_keycb(http_parser *htp, const char *data, size_t len) {
...
@@ -832,9 +831,7 @@ int htp_hdr_keycb(http_parser *htp, const char *data, size_t len) {
if
(
ensure_max_header_fields
(
downstream
,
httpconf
)
!=
0
)
{
if
(
ensure_max_header_fields
(
downstream
,
httpconf
)
!=
0
)
{
return
-
1
;
return
-
1
;
}
}
auto
name
=
http2
::
copy_lower
(
balloc
,
StringRef
{
data
,
len
});
resp
.
fs
.
alloc_add_header_name
(
StringRef
{
data
,
len
});
auto
token
=
http2
::
lookup_token
(
name
);
resp
.
fs
.
add_header_token
(
name
,
StringRef
{},
false
,
token
);
}
}
}
else
{
}
else
{
// trailer part
// trailer part
...
@@ -847,9 +844,7 @@ int htp_hdr_keycb(http_parser *htp, const char *data, size_t len) {
...
@@ -847,9 +844,7 @@ int htp_hdr_keycb(http_parser *htp, const char *data, size_t len) {
// wrong place or crash if trailer fields are currently empty.
// wrong place or crash if trailer fields are currently empty.
return
-
1
;
return
-
1
;
}
}
auto
name
=
http2
::
copy_lower
(
balloc
,
StringRef
{
data
,
len
});
resp
.
fs
.
alloc_add_trailer_name
(
StringRef
{
data
,
len
});
auto
token
=
http2
::
lookup_token
(
name
);
resp
.
fs
.
add_trailer_token
(
name
,
StringRef
{},
false
,
token
);
}
}
}
}
return
0
;
return
0
;
...
...
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