From: Igor Sysoev Date: Tue, 10 Feb 2009 16:03:42 +0000 (+0000) Subject: fix /?new=arg?old=arg redirect case X-Git-Tag: release-0.7.34~1 X-Git-Url: http://git.kaiwu.me/%7B@url%7D?a=commitdiff_plain;h=97860160760773b329fb36f9b6253ba8e31dc141;p=nginx.git fix /?new=arg?old=arg redirect case --- diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index dd9db62fb..3afa604eb 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -244,10 +244,21 @@ ngx_http_script_compile(ngx_http_script_compile_t *sc) name.data = &sc->source->data[i]; - while (i < sc->source->len - && sc->source->data[i] != '$' - && !(sc->source->data[i] == '?' && sc->compile_args)) - { + while (i < sc->source->len) { + + if (sc->source->data[i] == '$') { + break; + } + + if (sc->source->data[i] == '?') { + + sc->args = 1; + + if (sc->compile_args) { + break; + } + } + i++; name.len++; }