summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-05-11 21:12:24 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-05-11 21:12:24 +0400
commit307b61771284a76d431e253dfcc9c1f7ec73e94c (patch)
tree97fe084f364bf5ed34ae732bd61afa8fde98dec8
parentabef0366e9bb7641058e4d8ab2a495ccf6ff5028 (diff)
downloadnginx-307b61771284a76d431e253dfcc9c1f7ec73e94c.tar.gz
Proxy: $proxy_internal_body_length fixed.
The $proxy_internal_body_length value might change during request lifetime, notably if proxy_set_body used, and use of a cached value might result in incorrect upstream requests. Patch by Lanshun Zhou.
-rw-r--r--src/http/modules/ngx_http_proxy_module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index eadc8c480..5e62caa30 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -615,7 +615,8 @@ static ngx_http_variable_t ngx_http_proxy_vars[] = {
#endif
{ ngx_string("proxy_internal_body_length"), NULL,
- ngx_http_proxy_internal_body_length_variable, 0, NGX_HTTP_VAR_NOHASH, 0 },
+ ngx_http_proxy_internal_body_length_variable, 0,
+ NGX_HTTP_VAR_NOCACHEABLE|NGX_HTTP_VAR_NOHASH, 0 },
{ ngx_null_string, NULL, NULL, 0, 0, 0 }
};