From: Maxim Dounin Date: Wed, 6 Oct 2021 15:01:42 +0000 (+0300) Subject: Fixed $content_length cacheability with chunked (ticket #2252). X-Git-Tag: release-1.20.2~2 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=3a8727888262bf6da84b1df155909e424bbb3b30;p=nginx.git Fixed $content_length cacheability with chunked (ticket #2252). --- diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index c25d80ccf..942dacd70 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -1179,6 +1179,10 @@ ngx_http_variable_content_length(ngx_http_request_t *r, v->no_cacheable = 0; v->not_found = 0; + } else if (r->headers_in.chunked) { + v->not_found = 1; + v->no_cacheable = 1; + } else { v->not_found = 1; }