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
9653ae98
Commit
9653ae98
authored
Jun 04, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Send 100-continue for API request
parent
d837887a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+17
-0
No files found.
src/shrpx_https_upstream.cc
View file @
9653ae98
...
...
@@ -411,6 +411,23 @@ int htp_hdrs_completecb(http_parser *htp) {
return
-
1
;
}
auto
faddr
=
handler
->
get_upstream_addr
();
if
(
faddr
->
api
)
{
// Normally, we forward expect: 100-continue to backend server,
// and let them decide whether responds with 100 Continue or not.
// For API endpoint, we have no backend, so just send 100 Continue
// here to make the client happy.
auto
expect
=
req
.
fs
.
header
(
http2
::
HD_EXPECT
);
if
(
expect
&&
util
::
strieq
(
expect
->
value
,
StringRef
::
from_lit
(
"100-continue"
)))
{
auto
output
=
downstream
->
get_response_buf
();
constexpr
auto
res
=
StringRef
::
from_lit
(
"HTTP/1.1 100 Continue
\r\n\r\n
"
);
output
->
append
(
res
);
handler
->
signal_write
();
}
}
return
0
;
}
}
// namespace
...
...
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