# HG changeset patch # User Igor Sysoev # Date 1238603478 0 # Node ID 0434fd856a2fee255c2557ca1a7244a0b2b4179b # Parent ccf2821371090ce7aaca9f564df84d7ea8412555 r2499 merge: fix /?new=arg?old=arg redirect case diff -r ccf282137109 -r 0434fd856a2f src/http/ngx_http_script.c --- a/src/http/ngx_http_script.c Wed Apr 01 16:28:47 2009 +0000 +++ b/src/http/ngx_http_script.c Wed Apr 01 16:31:18 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++; }