Mercurial > hg > nginx-quic
comparison src/http/ngx_http_variables.c @ 4510:d6c507a46c90 stable-1.0
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).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 05 Mar 2012 12:36:51 +0000 |
parents | 4919fb357a5d |
children |
comparison
equal
deleted
inserted
replaced
4509:8e24fb8ee3e7 | 4510:d6c507a46c90 |
---|---|
426 { | 426 { |
427 ngx_http_variable_value_t *v; | 427 ngx_http_variable_value_t *v; |
428 | 428 |
429 v = &r->variables[index]; | 429 v = &r->variables[index]; |
430 | 430 |
431 if (v->valid) { | 431 if (v->valid || v->not_found) { |
432 if (!v->no_cacheable) { | 432 if (!v->no_cacheable) { |
433 return v; | 433 return v; |
434 } | 434 } |
435 | 435 |
436 v->valid = 0; | 436 v->valid = 0; |