diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-03-30 19:00:34 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-03-30 19:00:34 +0000 |
commit | 2c8f05737a8ccc788ddc4b4353741773eb9bdc07 (patch) | |
tree | 9b1705ebb62c5daed87b6770e3e7ec0b1cc20a34 /src | |
parent | 3e933d2919ed7672127e4bd766f213c75a6ea3c4 (diff) | |
download | nginx-2c8f05737a8ccc788ddc4b4353741773eb9bdc07.tar.gz nginx-2c8f05737a8ccc788ddc4b4353741773eb9bdc07.zip |
flush nocachable variables before ngx_http_script_run()
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_script.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index 54dacb317..63959498b 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -305,9 +305,20 @@ u_char * ngx_http_script_run(ngx_http_request_t *r, ngx_str_t *value, void *code_lengths, size_t len, void *code_values) { - ngx_http_script_code_pt code; - ngx_http_script_len_code_pt lcode; - ngx_http_script_engine_t e; + ngx_uint_t i; + ngx_http_script_code_pt code; + ngx_http_script_len_code_pt lcode; + ngx_http_script_engine_t e; + ngx_http_core_main_conf_t *cmcf; + + cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); + + for (i = 0; i < cmcf->variables.nelts; i++) { + if (r->variables[i].no_cachable) { + r->variables[i].valid = 0; + r->variables[i].not_found = 0; + } + } ngx_memzero(&e, sizeof(ngx_http_script_engine_t)); |