diff -ruN nginx-1.1.11/src/http/ngx_http_core_module.c nginx-1.1.11_zls/src/http/ngx_http_core_module.c
--- nginx-1.1.11/src/http/ngx_http_core_module.c	2011-12-06 21:23:37.000000000 +0800
+++ nginx-1.1.11_zls/src/http/ngx_http_core_module.c	2011-12-16 16:31:27.751927635 +0800
@@ -2481,6 +2481,8 @@
 
     r->uri = *uri;
 
+    r->valid_unparsed_uri = 0;
+
     if (args) {
         r->args = *args;
 
diff -ruN nginx-1.1.11/src/http/ngx_http_upstream.c nginx-1.1.11_zls/src/http/ngx_http_upstream.c
--- nginx-1.1.11/src/http/ngx_http_upstream.c	2011-12-09 21:19:57.000000000 +0800
+++ nginx-1.1.11_zls/src/http/ngx_http_upstream.c	2011-12-16 16:30:25.399218885 +0800
@@ -1895,8 +1895,6 @@
             r->method = NGX_HTTP_GET;
         }
 
-        r->valid_unparsed_uri = 0;
-
         ngx_http_internal_redirect(r, uri, &args);
         ngx_http_finalize_request(r, NGX_DONE);
         return NGX_DONE;
