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
2795da84
Commit
2795da84
authored
Oct 09, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Apply timeout for incoming header block
parent
175c7886
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+5
-2
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+3
-1
No files found.
src/shrpx_http2_upstream.cc
View file @
2795da84
...
...
@@ -279,6 +279,8 @@ int on_begin_headers_callback(nghttp2_session *session,
downstream
->
reset_upstream_rtimer
();
handler
->
repeat_read_timer
();
auto
&
req
=
downstream
->
request
();
// Although, we deprecated minor version from HTTP/2, we supply
...
...
@@ -472,6 +474,7 @@ int on_frame_recv_callback(nghttp2_session *session, const nghttp2_frame *frame,
verbose_on_frame_recv_callback
(
session
,
frame
,
user_data
);
}
auto
upstream
=
static_cast
<
Http2Upstream
*>
(
user_data
);
auto
handler
=
upstream
->
get_client_handler
();
switch
(
frame
->
hd
.
type
)
{
case
NGHTTP2_DATA
:
{
...
...
@@ -505,6 +508,8 @@ int on_frame_recv_callback(nghttp2_session *session, const nghttp2_frame *frame,
if
(
frame
->
headers
.
cat
==
NGHTTP2_HCAT_REQUEST
)
{
downstream
->
reset_upstream_rtimer
();
handler
->
stop_read_timer
();
return
upstream
->
on_request_headers
(
downstream
,
frame
);
}
...
...
@@ -1506,8 +1511,6 @@ int Http2Upstream::error_reply(Downstream *downstream,
void
Http2Upstream
::
add_pending_downstream
(
std
::
unique_ptr
<
Downstream
>
downstream
)
{
downstream_queue_
.
add_pending
(
std
::
move
(
downstream
));
handler_
->
stop_read_timer
();
}
void
Http2Upstream
::
remove_downstream
(
Downstream
*
downstream
)
{
...
...
src/shrpx_https_upstream.cc
View file @
2795da84
...
...
@@ -76,7 +76,7 @@ int htp_msg_begin(http_parser *htp) {
upstream
->
attach_downstream
(
std
::
move
(
downstream
));
handler
->
stop
_read_timer
();
handler
->
repeat
_read_timer
();
return
0
;
}
...
...
@@ -292,6 +292,8 @@ int htp_hdrs_completecb(http_parser *htp) {
req
.
connection_close
=
!
http_should_keep_alive
(
htp
);
handler
->
stop_read_timer
();
auto
method
=
req
.
method
;
if
(
LOG_ENABLED
(
INFO
))
{
...
...
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