]> git.kaiwu.me - nginx.git/commitdiff
r2499 merge:
authorIgor Sysoev <igor@sysoev.ru>
Wed, 1 Apr 2009 16:31:18 +0000 (16:31 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 1 Apr 2009 16:31:18 +0000 (16:31 +0000)
fix /?new=arg?old=arg redirect case

src/http/ngx_http_script.c

index acd867fdbee56e54fb10fe1dfb8ab7db0ffdbd7b..fc980f4b0fca7c1e497e79b81f8e72d24da6ba6f 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++;
         }