comparison src/http/modules/ngx_http_proxy_module.c @ 7931:055b2a847117

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.
author Awdhesh Mathpal <mathpal@amazon.com>
date Thu, 07 Oct 2021 19:23:11 -0700
parents 419c066cb710
children 2f443cac3f1e
comparison
equal deleted inserted replaced
7930:ae7c767aa491 7931:055b2a847117
2335 2335
2336 if (u->length == 0) { 2336 if (u->length == 0) {
2337 ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, 2337 ngx_log_error(NGX_LOG_WARN, r->connection->log, 0,
2338 "upstream sent more data than specified in " 2338 "upstream sent more data than specified in "
2339 "\"Content-Length\" header"); 2339 "\"Content-Length\" header");
2340 u->keepalive = 0;
2340 return NGX_OK; 2341 return NGX_OK;
2341 } 2342 }
2342 2343
2343 for (cl = u->out_bufs, ll = &u->out_bufs; cl; cl = cl->next) { 2344 for (cl = u->out_bufs, ll = &u->out_bufs; cl; cl = cl->next) {
2344 ll = &cl->next; 2345 ll = &cl->next;