]> git.kaiwu.me - nginx.git/commitdiff
set r->valid_unparsed_uri just after request line processing,
authorIgor Sysoev <igor@sysoev.ru>
Tue, 14 Dec 2010 19:15:08 +0000 (19:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 14 Dec 2010 19:15:08 +0000 (19:15 +0000)
it allows to use X-Accel-Redirect'ed URI in a proxy_pass without URI part
this fix corresponds to r3616

src/http/ngx_http_core_module.c
src/http/ngx_http_request.c

index 479592a8540cf838aab899dbfe840671c0866e98..caf8c273d6675914366130377e615bb9a0309c34 100644 (file)
@@ -785,10 +785,6 @@ ngx_http_handler(ngx_http_request_t *r)
         r->phase_handler = cmcf->phase_engine.server_rewrite_index;
     }
 
-    if (r->unparsed_uri.len) {
-        r->valid_unparsed_uri = 1;
-    }
-
     r->valid_location = 1;
 #if (NGX_HTTP_GZIP)
     r->gzip_tested = 0;
index 5710c699f2976d5db3f2ecdf286eee4ff899f2a7..7a18980c48ff9080d67d85c8507d345a82dca2cf 100644 (file)
@@ -752,6 +752,7 @@ ngx_http_process_request_line(ngx_event_t *rev)
             r->unparsed_uri.len = r->uri_end - r->uri_start;
             r->unparsed_uri.data = r->uri_start;
 
+            r->valid_unparsed_uri = 1;
 
             r->method_name.len = r->method_end - r->request_start + 1;
             r->method_name.data = r->request_line.data;