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
e08df284
Commit
e08df284
authored
Jul 03, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Disallow 2nd message in http downstream
parent
1ce00f45
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
src/shrpx_http_downstream_connection.cc
src/shrpx_http_downstream_connection.cc
+14
-1
No files found.
src/shrpx_http_downstream_connection.cc
View file @
e08df284
...
@@ -389,6 +389,19 @@ bool HttpDownstreamConnection::get_output_buffer_full()
...
@@ -389,6 +389,19 @@ bool HttpDownstreamConnection::get_output_buffer_full()
return
evbuffer_get_length
(
output
)
>=
OUTBUF_MAX_THRES
;
return
evbuffer_get_length
(
output
)
>=
OUTBUF_MAX_THRES
;
}
}
namespace
{
int
htp_msg_begincb
(
http_parser
*
htp
)
{
auto
downstream
=
static_cast
<
Downstream
*>
(
htp
->
data
);
if
(
downstream
->
get_response_state
()
!=
Downstream
::
INITIAL
)
{
return
-
1
;
}
return
0
;
}
}
// namespace
namespace
{
namespace
{
int
htp_hdrs_completecb
(
http_parser
*
htp
)
int
htp_hdrs_completecb
(
http_parser
*
htp
)
{
{
...
@@ -498,7 +511,7 @@ int htp_msg_completecb(http_parser *htp)
...
@@ -498,7 +511,7 @@ int htp_msg_completecb(http_parser *htp)
namespace
{
namespace
{
http_parser_settings
htp_hooks
=
{
http_parser_settings
htp_hooks
=
{
nullptr
,
// http_cb
on_message_begin;
htp_msg_begincb
,
// http_cb
on_message_begin;
nullptr
,
// http_data_cb on_url;
nullptr
,
// http_data_cb on_url;
nullptr
,
// http_data_cb on_status;
nullptr
,
// http_data_cb on_status;
htp_hdr_keycb
,
// http_data_cb on_header_field;
htp_hdr_keycb
,
// http_data_cb on_header_field;
...
...
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