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
5a6d6ccb
Commit
5a6d6ccb
authored
Jan 21, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Read from backend eagerly in all upstreams
parent
426fbda7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+2
-1
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+7
-0
src/shrpx_spdy_upstream.cc
src/shrpx_spdy_upstream.cc
+11
-0
No files found.
src/shrpx_http2_upstream.cc
View file @
5a6d6ccb
...
...
@@ -1006,7 +1006,8 @@ ssize_t downstream_data_read_callback(nghttp2_session *session,
auto
dconn
=
downstream
->
get_downstream_connection
();
if
(
body
->
rleft
()
==
0
&&
dconn
)
{
if
(
body
->
rleft
()
==
0
&&
dconn
&&
downstream
->
get_response_state
()
!=
Downstream
::
MSG_COMPLETE
)
{
// Try to read more if buffer is empty. This will help small
// buffer and make priority handling a bit better.
if
(
upstream
->
downstream_read
(
dconn
)
!=
0
)
{
...
...
src/shrpx_https_upstream.cc
View file @
5a6d6ccb
...
...
@@ -391,7 +391,14 @@ int HttpsUpstream::on_write() {
if
(
!
downstream
)
{
return
0
;
}
auto
dconn
=
downstream
->
get_downstream_connection
();
auto
wb
=
handler_
->
get_wb
();
if
(
wb
->
rleft
()
==
0
&&
dconn
&&
downstream
->
get_response_state
()
!=
Downstream
::
MSG_COMPLETE
)
{
if
(
downstream_read
(
dconn
)
!=
0
)
{
return
-
1
;
}
}
struct
iovec
iov
[
2
];
auto
iovcnt
=
wb
->
wiovec
(
iov
);
if
(
iovcnt
==
0
)
{
...
...
src/shrpx_spdy_upstream.cc
View file @
5a6d6ccb
...
...
@@ -704,6 +704,17 @@ ssize_t spdy_data_read_callback(spdylay_session *session, int32_t stream_id,
auto
body
=
downstream
->
get_response_buf
();
assert
(
body
);
auto
dconn
=
downstream
->
get_downstream_connection
();
if
(
body
->
rleft
()
==
0
&&
dconn
&&
downstream
->
get_response_state
()
!=
Downstream
::
MSG_COMPLETE
)
{
// Try to read more if buffer is empty. This will help small
// buffer and make priority handling a bit better.
if
(
upstream
->
downstream_read
(
dconn
)
!=
0
)
{
return
SPDYLAY_ERR_CALLBACK_FAILURE
;
}
}
auto
nread
=
body
->
remove
(
buf
,
length
);
auto
body_empty
=
body
->
rleft
()
==
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