diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-04-01 16:31:18 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-04-01 16:31:18 +0000 |
commit | 7ca140c630c33733b4f4eb474faf9be28cb8d435 (patch) | |
tree | f2ee9a50a890f4e71cc58c006443c4da7504f1f7 | |
parent | af2af8d2848b9ca81ebcd3b27932de46695a6a3b (diff) | |
download | nginx-7ca140c630c33733b4f4eb474faf9be28cb8d435.tar.gz |
r2499 merge:
fix /?new=arg?old=arg redirect case
-rw-r--r-- | src/http/ngx_http_script.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index acd867fdb..fc980f4b0 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++; } |