Maxim Dounin
October 12, 2021 12:50PM
details: https://hg.nginx.org/nginx/rev/055b2a847117
branches:
changeset: 7931:055b2a847117
user: Awdhesh Mathpal <mathpal@amazon.com>
date: Thu Oct 07 19:23:11 2021 -0700
description:
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.

diffstat:

src/http/modules/ngx_http_proxy_module.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r ae7c767aa491 -r 055b2a847117 src/http/modules/ngx_http_proxy_module.c
--- a/src/http/modules/ngx_http_proxy_module.c Wed Oct 06 18:01:42 2021 +0300
+++ b/src/http/modules/ngx_http_proxy_module.c Thu Oct 07 19:23:11 2021 -0700
@@ -2337,6 +2337,7 @@ ngx_http_proxy_non_buffered_copy_filter(
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;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Proxy: disabled keepalive on extra data in non-buffered mode.

Maxim Dounin 205 October 12, 2021 12:50PM



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

Online Users

Guests: 122
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready