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
0b7ad5bf
Commit
0b7ad5bf
authored
Aug 18, 2021
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Process request body
parent
e2edcc50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
src/shrpx_http3_upstream.cc
src/shrpx_http3_upstream.cc
+25
-1
No files found.
src/shrpx_http3_upstream.cc
View file @
0b7ad5bf
...
...
@@ -1811,10 +1811,34 @@ void Http3Upstream::initiate_downstream(Downstream *downstream) {
namespace
{
int
http_recv_data
(
nghttp3_conn
*
conn
,
int64_t
stream_id
,
const
uint8_t
*
data
,
size_t
datalen
,
void
*
user_data
,
void
*
stream_user_data
)
{
auto
upstream
=
static_cast
<
Http3Upstream
*>
(
user_data
);
auto
downstream
=
static_cast
<
Downstream
*>
(
stream_user_data
);
if
(
upstream
->
http_recv_data
(
downstream
,
data
,
datalen
)
!=
0
)
{
return
NGHTTP3_ERR_CALLBACK_FAILURE
;
}
return
0
;
}
}
// namespace
int
Http3Upstream
::
http_recv_data
(
Downstream
*
downstream
,
const
uint8_t
*
data
,
size_t
datalen
)
{
downstream
->
reset_upstream_rtimer
();
if
(
downstream
->
push_upload_data_chunk
(
data
,
datalen
)
!=
0
)
{
if
(
downstream
->
get_response_state
()
!=
DownstreamState
::
MSG_COMPLETE
)
{
shutdown_stream
(
downstream
,
NGHTTP3_H3_INTERNAL_ERROR
);
}
consume
(
downstream
->
get_stream_id
(),
datalen
);
return
0
;
}
return
0
;
}
namespace
{
int
http_end_stream
(
nghttp3_conn
*
conn
,
int64_t
stream_id
,
void
*
user_data
,
void
*
stream_user_data
)
{
...
...
@@ -1973,7 +1997,7 @@ int Http3Upstream::setup_httpconn() {
nghttp3_callbacks
callbacks
{
shrpx
::
http_acked_stream_data
,
shrpx
::
http_stream_close
,
http_recv_data
,
shrpx
::
http_recv_data
,
http_deferred_consume
,
shrpx
::
http_begin_request_headers
,
shrpx
::
http_recv_request_header
,
...
...
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