diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-03-05 12:36:51 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-03-05 12:36:51 +0000 |
| commit | 31b3edd003a6fd4aba0c7fd1428c062a3c57bec6 (patch) | |
| tree | a5d19f216c2d5b57bbb1c145497ecdd853b1e45a /src/http/ngx_http_variables.c | |
| parent | 8f78d3ae636d01a3f76e67a51808506c4a943891 (diff) | |
| download | nginx-31b3edd003a6fd4aba0c7fd1428c062a3c57bec6.tar.gz nginx-31b3edd003a6fd4aba0c7fd1428c062a3c57bec6.tar.bz2 | |
Merge of r4471:
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 '')
| -rw-r--r-- | src/http/ngx_http_variables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index c936cc43d..a9eb0afb7 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -428,7 +428,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; } |
