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
964c0d10
Commit
964c0d10
authored
Jan 27, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Don't return chunked response for pre-HTTP/1.1 request
parent
817f35f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/shrpx_spdy_session.cc
src/shrpx_spdy_session.cc
+12
-3
No files found.
src/shrpx_spdy_session.cc
View file @
964c0d10
...
...
@@ -591,11 +591,20 @@ void on_ctrl_recv_callback
status
=
downstream
->
get_response_http_status
();
if
(
!
((
100
<=
status
&&
status
<=
199
)
||
status
==
204
||
status
==
304
))
{
// In SPDY, we are supporsed not to receive
// transfer-encoding.
// Here we have response body but Content-Length is not known
// in advance.
if
(
downstream
->
get_request_major
()
<=
0
||
downstream
->
get_request_minor
()
<=
0
)
{
// We simply close connection for pre-HTTP/1.1 in this case.
downstream
->
set_response_connection_close
(
true
);
}
else
{
// Otherwise, use chunked encoding to keep upstream
// connection open. In SPDY, we are supporsed not to
// receive transfer-encoding.
downstream
->
add_response_header
(
"transfer-encoding"
,
"chunked"
);
}
}
}
if
(
LOG_ENABLED
(
INFO
))
{
std
::
stringstream
ss
;
...
...
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