summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2021-10-06 18:01:42 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2021-10-06 18:01:42 +0300
commit3a8727888262bf6da84b1df155909e424bbb3b30 (patch)
tree840b12b62ac6baacd4d920e9b4f540a30f295231 /src
parent9b2488b2c350588423899f12fc062a35d5e86cad (diff)
downloadnginx-3a8727888262bf6da84b1df155909e424bbb3b30.tar.gz
nginx-3a8727888262bf6da84b1df155909e424bbb3b30.tar.bz2
Fixed $content_length cacheability with chunked (ticket #2252).
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_variables.c4
1 files changed, 4 insertions, 0 deletions
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;
}