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
a255e4ef
Commit
a255e4ef
authored
Nov 16, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Use same priority in frontend and backend HTTP2
parent
81cf4841
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
src/shrpx_downstream.cc
src/shrpx_downstream.cc
+6
-1
src/shrpx_downstream.h
src/shrpx_downstream.h
+3
-2
src/shrpx_http2_downstream_connection.cc
src/shrpx_http2_downstream_connection.cc
+4
-2
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+1
-1
No files found.
src/shrpx_downstream.cc
View file @
a255e4ef
...
@@ -525,11 +525,16 @@ evbuffer* Downstream::get_response_body_buf()
...
@@ -525,11 +525,16 @@ evbuffer* Downstream::get_response_body_buf()
return
response_body_buf_
;
return
response_body_buf_
;
}
}
void
Downstream
::
set_priority
(
int
pri
)
void
Downstream
::
set_priority
(
int
32_t
pri
)
{
{
priority_
=
pri
;
priority_
=
pri
;
}
}
int32_t
Downstream
::
get_priorty
()
const
{
return
priority_
;
}
void
Downstream
::
check_upgrade_fulfilled
()
void
Downstream
::
check_upgrade_fulfilled
()
{
{
if
(
request_method_
==
"CONNECT"
)
{
if
(
request_method_
==
"CONNECT"
)
{
...
...
src/shrpx_downstream.h
View file @
a255e4ef
...
@@ -54,7 +54,8 @@ public:
...
@@ -54,7 +54,8 @@ public:
Upstream
*
get_upstream
()
const
;
Upstream
*
get_upstream
()
const
;
void
set_stream_id
(
int32_t
stream_id
);
void
set_stream_id
(
int32_t
stream_id
);
int32_t
get_stream_id
()
const
;
int32_t
get_stream_id
()
const
;
void
set_priority
(
int
pri
);
void
set_priority
(
int32_t
pri
);
int32_t
get_priorty
()
const
;
void
pause_read
(
IOCtrlReason
reason
);
void
pause_read
(
IOCtrlReason
reason
);
int
resume_read
(
IOCtrlReason
reason
);
int
resume_read
(
IOCtrlReason
reason
);
void
force_resume_read
();
void
force_resume_read
();
...
@@ -177,7 +178,7 @@ private:
...
@@ -177,7 +178,7 @@ private:
Upstream
*
upstream_
;
Upstream
*
upstream_
;
DownstreamConnection
*
dconn_
;
DownstreamConnection
*
dconn_
;
int32_t
stream_id_
;
int32_t
stream_id_
;
int
priority_
;
int
32_t
priority_
;
// stream ID in backend connection
// stream ID in backend connection
int32_t
downstream_stream_id_
;
int32_t
downstream_stream_id_
;
// true if the request contains upgrade token (HTTP Upgrade or
// true if the request contains upgrade token (HTTP Upgrade or
...
...
src/shrpx_http2_downstream_connection.cc
View file @
a255e4ef
...
@@ -392,9 +392,11 @@ int Http2DownstreamConnection::push_request_headers()
...
@@ -392,9 +392,11 @@ int Http2DownstreamConnection::push_request_headers()
nghttp2_data_provider
data_prd
;
nghttp2_data_provider
data_prd
;
data_prd
.
source
.
ptr
=
this
;
data_prd
.
source
.
ptr
=
this
;
data_prd
.
read_callback
=
http2_data_read_callback
;
data_prd
.
read_callback
=
http2_data_read_callback
;
rv
=
http2session_
->
submit_request
(
this
,
0
,
nv
.
data
(),
&
data_prd
);
rv
=
http2session_
->
submit_request
(
this
,
downstream_
->
get_priorty
(),
nv
.
data
(),
&
data_prd
);
}
else
{
}
else
{
rv
=
http2session_
->
submit_request
(
this
,
0
,
nv
.
data
(),
nullptr
);
rv
=
http2session_
->
submit_request
(
this
,
downstream_
->
get_priorty
(),
nv
.
data
(),
nullptr
);
}
}
if
(
rv
!=
0
)
{
if
(
rv
!=
0
)
{
DCLOG
(
FATAL
,
this
)
<<
"nghttp2_submit_request() failed"
;
DCLOG
(
FATAL
,
this
)
<<
"nghttp2_submit_request() failed"
;
...
...
src/shrpx_https_upstream.cc
View file @
a255e4ef
...
@@ -76,7 +76,7 @@ int htp_msg_begin(http_parser *htp)
...
@@ -76,7 +76,7 @@ int htp_msg_begin(http_parser *htp)
ULOG
(
INFO
,
upstream
)
<<
"HTTP request started"
;
ULOG
(
INFO
,
upstream
)
<<
"HTTP request started"
;
}
}
upstream
->
reset_current_header_length
();
upstream
->
reset_current_header_length
();
auto
downstream
=
new
Downstream
(
upstream
,
0
,
0
);
auto
downstream
=
new
Downstream
(
upstream
,
0
,
NGHTTP2_PRI_DEFAULT
);
upstream
->
attach_downstream
(
downstream
);
upstream
->
attach_downstream
(
downstream
);
return
0
;
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