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
9aee5183
Commit
9aee5183
authored
Mar 15, 2017
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Effectively revert
ff64f64e
parent
6ca515ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
20 deletions
+10
-20
src/shrpx_client_handler.cc
src/shrpx_client_handler.cc
+0
-8
src/shrpx_client_handler.h
src/shrpx_client_handler.h
+0
-2
src/shrpx_https_upstream.cc
src/shrpx_https_upstream.cc
+10
-10
No files found.
src/shrpx_client_handler.cc
View file @
9aee5183
...
...
@@ -1231,14 +1231,6 @@ ClientHandler::ReadBuf *ClientHandler::get_rb() { return &rb_; }
void
ClientHandler
::
signal_write
()
{
conn_
.
wlimit
.
startw
();
}
void
ClientHandler
::
signal_write_no_wait
()
{
// ev_feed_event works without starting watcher. But rate limiter
// requires active watcher. Without that, we might not send pending
// data. Also ClientHandler::write_tls requires it.
conn_
.
wlimit
.
startw
();
ev_feed_event
(
conn_
.
loop
,
&
conn_
.
wev
,
EV_WRITE
);
}
RateLimit
*
ClientHandler
::
get_rlimit
()
{
return
&
conn_
.
rlimit
;
}
RateLimit
*
ClientHandler
::
get_wlimit
()
{
return
&
conn_
.
wlimit
;
}
...
...
src/shrpx_client_handler.h
View file @
9aee5183
...
...
@@ -133,8 +133,6 @@ public:
RateLimit
*
get_wlimit
();
void
signal_write
();
// Use this for HTTP/1 frontend since it produces better result.
void
signal_write_no_wait
();
ev_io
*
get_wev
();
void
setup_upstream_io_callback
();
...
...
src/shrpx_https_upstream.cc
View file @
9aee5183
...
...
@@ -454,7 +454,7 @@ int htp_hdrs_completecb(http_parser *htp) {
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
_no_wait
();
handler
->
signal_write
();
}
}
...
...
@@ -500,7 +500,7 @@ int htp_msg_completecb(http_parser *htp) {
// in request phase hook. We only delete and proceed to the
// next request handling (if we don't close the connection). We
// first pause parser here just as we normally do, and call
// signal_write
_no_wait
() to run on_write().
// signal_write() to run on_write().
http_parser_pause
(
htp
,
1
);
return
0
;
...
...
@@ -605,7 +605,7 @@ int HttpsUpstream::on_read() {
if
(
downstream
&&
downstream
->
get_request_state
()
==
Downstream
::
MSG_COMPLETE
&&
downstream
->
get_response_state
()
==
Downstream
::
MSG_COMPLETE
)
{
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
}
return
0
;
}
...
...
@@ -619,7 +619,7 @@ int HttpsUpstream::on_read() {
if
(
downstream
&&
downstream
->
get_response_state
()
!=
Downstream
::
INITIAL
)
{
handler_
->
set_should_close_after_write
(
true
);
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
return
0
;
}
...
...
@@ -645,7 +645,7 @@ int HttpsUpstream::on_read() {
error_reply
(
status_code
);
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
return
0
;
}
...
...
@@ -772,7 +772,7 @@ int HttpsUpstream::downstream_read(DownstreamConnection *dconn) {
}
end:
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
return
0
;
}
...
...
@@ -829,7 +829,7 @@ int HttpsUpstream::downstream_eof(DownstreamConnection *dconn) {
// drop connection.
return
-
1
;
end:
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
return
0
;
}
...
...
@@ -857,7 +857,7 @@ int HttpsUpstream::downstream_error(DownstreamConnection *dconn, int events) {
downstream
->
pop_downstream_connection
();
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
return
0
;
}
...
...
@@ -1229,14 +1229,14 @@ int HttpsUpstream::on_downstream_body_complete(Downstream *downstream) {
int
HttpsUpstream
::
on_downstream_abort_request
(
Downstream
*
downstream
,
unsigned
int
status_code
)
{
error_reply
(
status_code
);
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
return
0
;
}
int
HttpsUpstream
::
on_downstream_abort_request_with_https_redirect
(
Downstream
*
downstream
)
{
redirect_to_https
(
downstream
);
handler_
->
signal_write
_no_wait
();
handler_
->
signal_write
();
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