# HG changeset patch # User Igor Sysoev # Date 1234281822 0 # Node ID d3357bf23a5e8abf0b4b9ee8d7b5f199beb9942f # Parent 1ab9cef4ff6c06b5389e6f8438f239db4af69cfe fix /?new=arg?old=arg redirect case diff -r 1ab9cef4ff6c -r d3357bf23a5e src/http/ngx_http_script.c --- a/src/http/ngx_http_script.c Tue Feb 10 15:19:45 2009 +0000 +++ b/src/http/ngx_http_script.c Tue Feb 10 16:03:42 2009 +0000 @@ -244,10 +244,21 @@ 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++; }