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
8cb92fc2
Commit
8cb92fc2
authored
Jul 31, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Handle error from Upstream::resume_read in upgrade code
parent
924b1bd6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
src/shrpx_http_downstream_connection.cc
src/shrpx_http_downstream_connection.cc
+4
-1
src/shrpx_spdy_session.cc
src/shrpx_spdy_session.cc
+5
-1
No files found.
src/shrpx_http_downstream_connection.cc
View file @
8cb92fc2
...
@@ -367,7 +367,10 @@ int htp_hdrs_completecb(http_parser *htp)
...
@@ -367,7 +367,10 @@ int htp_hdrs_completecb(http_parser *htp)
if
(
downstream
->
get_upgraded
())
{
if
(
downstream
->
get_upgraded
())
{
// Upgrade complete, read until EOF in both ends
// Upgrade complete, read until EOF in both ends
downstream
->
get_upstream
()
->
resume_read
(
SHRPX_MSG_BLOCK
,
downstream
);
if
(
downstream
->
get_upstream
()
->
resume_read
(
SHRPX_MSG_BLOCK
,
downstream
)
!=
0
)
{
return
-
1
;
}
downstream
->
set_request_state
(
Downstream
::
HEADER_COMPLETE
);
downstream
->
set_request_state
(
Downstream
::
HEADER_COMPLETE
);
if
(
LOG_ENABLED
(
INFO
))
{
if
(
LOG_ENABLED
(
INFO
))
{
LOG
(
INFO
)
<<
"HTTP upgrade success. stream_id="
LOG
(
INFO
)
<<
"HTTP upgrade success. stream_id="
...
...
src/shrpx_spdy_session.cc
View file @
8cb92fc2
...
@@ -818,7 +818,11 @@ void on_frame_recv_callback
...
@@ -818,7 +818,11 @@ void on_frame_recv_callback
if
(
downstream
->
get_upgraded
())
{
if
(
downstream
->
get_upgraded
())
{
downstream
->
set_response_connection_close
(
true
);
downstream
->
set_response_connection_close
(
true
);
// On upgrade sucess, both ends can send data
// On upgrade sucess, both ends can send data
upstream
->
resume_read
(
SHRPX_MSG_BLOCK
,
downstream
);
if
(
upstream
->
resume_read
(
SHRPX_MSG_BLOCK
,
downstream
)
!=
0
)
{
// If resume_read fails, just drop connection. Not ideal.
delete
upstream
->
get_client_handler
();
return
;
}
downstream
->
set_request_state
(
Downstream
::
HEADER_COMPLETE
);
downstream
->
set_request_state
(
Downstream
::
HEADER_COMPLETE
);
if
(
LOG_ENABLED
(
INFO
))
{
if
(
LOG_ENABLED
(
INFO
))
{
SSLOG
(
INFO
,
spdy
)
<<
"HTTP upgrade success. stream_id="
SSLOG
(
INFO
,
spdy
)
<<
"HTTP upgrade success. stream_id="
...
...
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