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
c3459c9e
Commit
c3459c9e
authored
Nov 16, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Clarify return value of nghttp2_submit_push_promise is stream ID
parent
fe872034
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+8
-9
No files found.
src/shrpx_http2_upstream.cc
View file @
c3459c9e
...
...
@@ -1798,7 +1798,6 @@ int Http2Upstream::submit_push_promise(const std::string &scheme,
const
std
::
string
&
authority
,
const
std
::
string
&
path
,
Downstream
*
downstream
)
{
int
rv
;
std
::
vector
<
nghttp2_nv
>
nva
;
// 4 for :method, :scheme, :path and :authority
nva
.
reserve
(
4
+
downstream
->
get_request_headers
().
size
());
...
...
@@ -1827,16 +1826,16 @@ int Http2Upstream::submit_push_promise(const std::string &scheme,
}
}
rv
=
nghttp2_submit_push_promise
(
session_
,
NGHTTP2_FLAG_NONE
,
downstream
->
get_stream_id
(),
nva
.
data
(),
nva
.
size
(),
nullptr
);
auto
promised_stream_id
=
nghttp2_submit_push_promise
(
session_
,
NGHTTP2_FLAG_NONE
,
downstream
->
get_stream_id
(),
nva
.
data
(),
nva
.
size
(),
nullptr
);
if
(
rv
<
0
)
{
if
(
promised_stream_id
<
0
)
{
if
(
LOG_ENABLED
(
INFO
))
{
ULOG
(
INFO
,
this
)
<<
"nghttp2_submit_push_promise() failed: "
<<
nghttp2_strerror
(
rv
);
<<
nghttp2_strerror
(
promised_stream_id
);
}
if
(
nghttp2_is_fatal
(
rv
))
{
if
(
nghttp2_is_fatal
(
promised_stream_id
))
{
return
-
1
;
}
return
0
;
...
...
@@ -1847,8 +1846,8 @@ int Http2Upstream::submit_push_promise(const std::string &scheme,
for
(
auto
&
nv
:
nva
)
{
ss
<<
TTY_HTTP_HD
<<
nv
.
name
<<
TTY_RST
<<
": "
<<
nv
.
value
<<
"
\n
"
;
}
ULOG
(
INFO
,
this
)
<<
"HTTP push request headers. promised_stream_id="
<<
rv
<<
"
\n
"
<<
ss
.
str
();
ULOG
(
INFO
,
this
)
<<
"HTTP push request headers. promised_stream_id="
<<
promised_stream_id
<<
"
\n
"
<<
ss
.
str
();
}
return
0
;
...
...
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