diff options
author | Awdhesh Mathpal <mathpal@amazon.com> | 2021-10-07 19:23:11 -0700 |
---|---|---|
committer | Awdhesh Mathpal <mathpal@amazon.com> | 2021-10-07 19:23:11 -0700 |
commit | 2a88047ac1a88fbe6038a822e0f1b67af847c998 (patch) | |
tree | 689a97851a82c4af7b4d9def5414ab0cd6bb1ed0 | |
parent | c9c3f2f005c43fd885bd78f86e1044261e639bea (diff) | |
download | nginx-2a88047ac1a88fbe6038a822e0f1b67af847c998.tar.gz |
Proxy: disabled keepalive on extra data in non-buffered mode.
The u->keepalive flag is initialized early if the response has no body
(or an empty body), and needs to be reset if there are any extra data,
similarly to how it is done in ngx_http_proxy_copy_filter(). Missed
in 83c4622053b0.
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 084462746..a5cc27b1e 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -2337,6 +2337,7 @@ ngx_http_proxy_non_buffered_copy_filter(void *data, ssize_t bytes) ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, "upstream sent more data than specified in " "\"Content-Length\" header"); + u->keepalive = 0; return NGX_OK; } |