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
49a9ec2c
Commit
49a9ec2c
authored
Aug 17, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use int for resonse_rst_stream_error_code_
parent
5d2390de
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
src/shrpx_downstream.cc
src/shrpx_downstream.cc
+3
-4
src/shrpx_downstream.h
src/shrpx_downstream.h
+3
-3
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+2
-2
src/shrpx_spdy_upstream.cc
src/shrpx_spdy_upstream.cc
+1
-2
No files found.
src/shrpx_downstream.cc
View file @
49a9ec2c
...
...
@@ -55,7 +55,7 @@ Downstream::Downstream(Upstream *upstream, int stream_id, int priority)
stream_id_
(
stream_id
),
priority_
(
priority
),
downstream_stream_id_
(
-
1
),
response_rst_stream_error_code_
(
NGHTTP2_NO_ERROR
),
response_rst_stream_error_code_
(
-
1
),
request_state_
(
INITIAL
),
request_major_
(
1
),
request_minor_
(
1
),
...
...
@@ -821,13 +821,12 @@ int32_t Downstream::get_downstream_stream_id() const
return
downstream_stream_id_
;
}
nghttp2_error_code
Downstream
::
get_response_rst_stream_error_code
()
const
int
Downstream
::
get_response_rst_stream_error_code
()
const
{
return
response_rst_stream_error_code_
;
}
void
Downstream
::
set_response_rst_stream_error_code
(
nghttp2_error_code
error_code
)
void
Downstream
::
set_response_rst_stream_error_code
(
int
error_code
)
{
response_rst_stream_error_code_
=
error_code
;
}
...
...
src/shrpx_downstream.h
View file @
49a9ec2c
...
...
@@ -206,8 +206,8 @@ public:
evbuffer
*
get_response_body_buf
();
void
add_response_bodylen
(
size_t
amount
);
int64_t
get_response_bodylen
()
const
;
nghttp2_error_code
get_response_rst_stream_error_code
()
const
;
void
set_response_rst_stream_error_code
(
nghttp2_error_code
error_code
);
int
get_response_rst_stream_error_code
()
const
;
void
set_response_rst_stream_error_code
(
int
error_code
);
// Inspects HTTP/1 response. This checks tranfer-encoding etc.
void
inspect_http1_response
();
// Clears some of member variables for response.
...
...
@@ -301,7 +301,7 @@ private:
int32_t
downstream_stream_id_
;
// RST_STREAM error_code from downstream HTTP2 connection
nghttp2_error_code
response_rst_stream_error_code_
;
int
response_rst_stream_error_code_
;
int
request_state_
;
int
request_major_
;
...
...
src/shrpx_http2_upstream.cc
View file @
49a9ec2c
...
...
@@ -626,14 +626,14 @@ int on_unknown_frame_recv_callback(nghttp2_session *session,
namespace
{
nghttp2_error_code
infer_upstream_rst_stream_error_code
(
nghttp2_error_code
downstream_error_code
)
(
int
downstream_error_code
)
{
// NGHTTP2_REFUSED_STREAM is important because it tells upstream
// client to retry.
switch
(
downstream_error_code
)
{
case
NGHTTP2_NO_ERROR
:
case
NGHTTP2_REFUSED_STREAM
:
return
downstream_error_code
;
return
static_cast
<
nghttp2_error_code
>
(
downstream_error_code
)
;
default:
return
NGHTTP2_INTERNAL_ERROR
;
}
...
...
src/shrpx_spdy_upstream.cc
View file @
49a9ec2c
...
...
@@ -411,8 +411,7 @@ void on_unknown_ctrl_recv_callback(spdylay_session *session,
namespace
{
// Infer upstream RST_STREAM status code from downstream HTTP/2
// error code.
uint32_t
infer_upstream_rst_stream_status_code
(
nghttp2_error_code
downstream_error_code
)
uint32_t
infer_upstream_rst_stream_status_code
(
int
downstream_error_code
)
{
// Only propagate *_REFUSED_STREAM so that upstream client can
// resend request.
...
...
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