aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-02-10 16:03:42 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-02-10 16:03:42 +0000
commit97860160760773b329fb36f9b6253ba8e31dc141 (patch)
tree0d3a60c3e2e83f4037ed4df820eaa7f3b45ab4a7 /src/http/ngx_http_script.c
parentc43beec76f16a9bf8e050b4872b0cc3b692c7db0 (diff)
downloadnginx-97860160760773b329fb36f9b6253ba8e31dc141.tar.gz
nginx-97860160760773b329fb36f9b6253ba8e31dc141.zip
fix /?new=arg?old=arg redirect case
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index dd9db62fb..3afa604eb 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++;
}