diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2021-10-06 18:01:42 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2021-10-06 18:01:42 +0300 |
commit | c9c3f2f005c43fd885bd78f86e1044261e639bea (patch) | |
tree | 973167bff663f80997550d25095460717400b3e1 | |
parent | e56ba23158b8466d108fd4d571bd7d9a88f2a473 (diff) | |
download | nginx-c9c3f2f005c43fd885bd78f86e1044261e639bea.tar.gz |
Fixed $content_length cacheability with chunked (ticket #2252).
-rw-r--r-- | src/http/ngx_http_variables.c | 4 |
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; } |