Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 7809:b1302f1dd2f6
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 28 Mar 2021 17:45:35 +0300 |
parents | 83c4622053b0 |
children | 1bf8ab7063de |
comparison
equal
deleted
inserted
replaced
7808:eb54227110f0 | 7809:b1302f1dd2f6 |
---|---|
3009 if (ngx_http_send_special(r, NGX_HTTP_FLUSH) == NGX_ERROR) { | 3009 if (ngx_http_send_special(r, NGX_HTTP_FLUSH) == NGX_ERROR) { |
3010 ngx_http_upstream_finalize_request(r, u, NGX_ERROR); | 3010 ngx_http_upstream_finalize_request(r, u, NGX_ERROR); |
3011 return; | 3011 return; |
3012 } | 3012 } |
3013 | 3013 |
3014 if (u->peer.connection->read->ready || u->length == 0) { | 3014 ngx_http_upstream_process_non_buffered_upstream(r, u); |
3015 ngx_http_upstream_process_non_buffered_upstream(r, u); | |
3016 } | |
3017 } | 3015 } |
3018 | 3016 |
3019 return; | 3017 return; |
3020 } | 3018 } |
3021 | 3019 |