aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-02-13 15:31:07 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-02-13 15:31:07 +0000
commit947fc03ca30e355fd562404f7e0b3ff0ec232c66 (patch)
tree86dbbef7678fed6e7b214a9abac4ea7b0580122f /src/http/ngx_http_variables.c
parent01c133cda41fd6c9e0b1bcdfad5739a272107ff0 (diff)
downloadnginx-947fc03ca30e355fd562404f7e0b3ff0ec232c66.tar.gz
nginx-947fc03ca30e355fd562404f7e0b3ff0ec232c66.zip
Variables: honor no_cacheable for not_found variables.
Variables with the "not_found" flag set follow the same rules as ones with the "valid" flag set. Make sure ngx_http_get_flushed_variable() will flush non-cacheable variables with the "not_found" flag set. This fixes at least one known problem with $args not available in a subrequest (with args) when there were no args in the main request and $args variable was queried in the main request (reported by Laurence Rowe aka elro on irc). Also this eliminates unneeded call to ngx_http_get_indexed_variable() in cacheable case (as it will return cached value anyway).
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r--src/http/ngx_http_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index d6bb92c98..78cfa234a 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -432,7 +432,7 @@ ngx_http_get_flushed_variable(ngx_http_request_t *r, ngx_uint_t index)
v = &r->variables[index];
- if (v->valid) {
+ if (v->valid || v->not_found) {
if (!v->no_cacheable) {
return v;
}