mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
[http_rewrite] Avoid duplicate non-cacheable variable calls for complex expressions
When defining a rewrite variable from a non-cacheable variable (set $var $computed_var), I've noticed 2 calls to $computed_var's get_handler (one to determine the total length of the created variable, the other to get the variable contents and copy them into the allocated buffer). Setting the flushed variable seems to address the problem while not breaking any existing test.
This commit is contained in:
parent
00637cce36
commit
354870a502
@ -174,6 +174,7 @@ ngx_http_rewrite_handler(ngx_http_request_t *r)
|
||||
e->quote = 1;
|
||||
e->log = rlcf->log;
|
||||
e->status = NGX_DECLINED;
|
||||
e->flushed = 1;
|
||||
|
||||
while (*(uintptr_t *) e->ip) {
|
||||
code = *(ngx_http_script_code_pt *) e->ip;
|
||||
|
Loading…
Reference in New Issue
Block a user