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
823bb6c3
Commit
823bb6c3
authored
Aug 21, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Require content-length in SPDY upstream if FIN flag is not set
parent
591f73e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/shrpx_spdy_upstream.cc
src/shrpx_spdy_upstream.cc
+10
-0
No files found.
src/shrpx_spdy_upstream.cc
View file @
823bb6c3
...
...
@@ -161,6 +161,7 @@ void on_ctrl_recv_callback
const
char
*
scheme
=
0
;
const
char
*
host
=
0
;
const
char
*
method
=
0
;
const
char
*
content_length
=
0
;
for
(
size_t
i
=
0
;
nv
[
i
];
i
+=
2
)
{
if
(
strcmp
(
nv
[
i
],
":path"
)
==
0
)
{
path
=
nv
[
i
+
1
];
...
...
@@ -172,6 +173,9 @@ void on_ctrl_recv_callback
}
else
if
(
strcmp
(
nv
[
i
],
":host"
)
==
0
)
{
host
=
nv
[
i
+
1
];
}
else
if
(
nv
[
i
][
0
]
!=
':'
)
{
if
(
strcmp
(
nv
[
i
],
"content-length"
)
==
0
)
{
content_length
=
nv
[
i
+
1
];
}
downstream
->
add_request_header
(
nv
[
i
],
nv
[
i
+
1
]);
}
}
...
...
@@ -179,6 +183,12 @@ void on_ctrl_recv_callback
upstream
->
rst_stream
(
downstream
,
SPDYLAY_INTERNAL_ERROR
);
return
;
}
// Require content-length if FIN flag is not set.
if
((
frame
->
syn_stream
.
hd
.
flags
&
SPDYLAY_CTRL_FLAG_FIN
)
==
0
&&
!
content_length
)
{
upstream
->
rst_stream
(
downstream
,
SPDYLAY_PROTOCOL_ERROR
);
return
;
}
// SpdyDownstreamConnection examines request path to find
// scheme. We construct abs URI for spdy_bridge mode as well as
// spdy_proxy mode.
...
...
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