]> git.kaiwu.me - nginx.git/commitdiff
fix /?new=arg?old=arg redirect case
authorIgor Sysoev <igor@sysoev.ru>
Tue, 10 Feb 2009 16:03:42 +0000 (16:03 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 10 Feb 2009 16:03:42 +0000 (16:03 +0000)
src/http/ngx_http_script.c

index dd9db62fb687837b9ea7dda68fd6b9dbd9e204ee..3afa604ebb65750b1061b0c980290c05ec591516 100644 (file)
@@ -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++;
         }