]> git.kaiwu.me - nginx.git/commitdiff
Proxy: $proxy_internal_body_length fixed.
authorMaxim Dounin <mdounin@mdounin.ru>
Sat, 11 May 2013 17:12:24 +0000 (21:12 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Sat, 11 May 2013 17:12:24 +0000 (21:12 +0400)
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.

src/http/modules/ngx_http_proxy_module.c

index eadc8c480bbef442c2593a08b191a2c50f3a4793..5e62caa30f4f447f48af3816664553c140dae3c8 100644 (file)
@@ -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 }
 };