]> git.kaiwu.me - nginx.git/commitdiff
Fixed $content_length cacheability with chunked (ticket #2252).
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 6 Oct 2021 15:01:42 +0000 (18:01 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 6 Oct 2021 15:01:42 +0000 (18:01 +0300)
src/http/ngx_http_variables.c

index c25d80ccf192b131dea8a32b34a84353c0e191e4..942dacd70ec07b30a398ca23ad6df642e1a61118 100644 (file)
@@ -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;
     }