diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2021-03-28 17:45:35 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2021-03-28 17:45:35 +0300 |
commit | 9104757a7d9adfced7c77396167e3e68bd11867c (patch) | |
tree | 64338a99d76c1437c4b05413528c952033358750 | |
parent | cb9fca08465a90a46a8a5143c58b994c3419b49c (diff) | |
download | nginx-9104757a7d9adfced7c77396167e3e68bd11867c.tar.gz nginx-9104757a7d9adfced7c77396167e3e68bd11867c.zip |
Upstream: fixed non-buffered proxying with eventport.
For new data to be reported with eventport on Solaris,
ngx_handle_read_event() needs to be called after reading response
headers. To do so, ngx_http_upstream_process_non_buffered_upstream()
now called unconditionally if there are no prepread data. This
won't cause any read() syscalls as long as upstream connection
is not ready for reading (c->read->ready is not set), but will result
in proper handling of all events.
-rw-r--r-- | src/http/ngx_http_upstream.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9cbb5a3b0..a01784aaa 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3011,9 +3011,7 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) return; } - if (u->peer.connection->read->ready || u->length == 0) { - ngx_http_upstream_process_non_buffered_upstream(r, u); - } + ngx_http_upstream_process_non_buffered_upstream(r, u); } return; |