Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: fixed non-buffered proxying with eventport.

Maxim Dounin
March 28, 2021 10:48AM
details: https://hg.nginx.org/nginx/rev/b1302f1dd2f6
branches:
changeset: 7809:b1302f1dd2f6
user: Maxim Dounin <mdounin@mdounin.ru>
date: Sun Mar 28 17:45:35 2021 +0300
description:
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.

diffstat:

src/http/ngx_http_upstream.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diffs (14 lines):

diff -r eb54227110f0 -r b1302f1dd2f6 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Sun Mar 28 17:45:31 2021 +0300
+++ b/src/http/ngx_http_upstream.c Sun Mar 28 17:45:35 2021 +0300
@@ -3011,9 +3011,7 @@ ngx_http_upstream_send_response(ngx_http
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;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: fixed non-buffered proxying with eventport.

Maxim Dounin 221 March 28, 2021 10:48AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 325
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready