]> git.kaiwu.me - nginx.git/commitdiff
Upstream: fixed changing method on X-Accel-Redirect.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 11 Jan 2016 16:08:12 +0000 (19:08 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 11 Jan 2016 16:08:12 +0000 (19:08 +0300)
Previously, only r->method was changed, resulting in handling of a request
as GET within nginx itself, but not in requests to proxied servers.

See http://mailman.nginx.org/pipermail/nginx/2015-December/049518.html.

src/http/ngx_http_upstream.c

index 99ef3aec7f2bef9f402c0750039a5c1715f61c39..7f377b676364c63286856c85d5c006e81288a477 100644 (file)
@@ -2499,6 +2499,7 @@ ngx_http_upstream_process_headers(ngx_http_request_t *r, ngx_http_upstream_t *u)
 
             if (r->method != NGX_HTTP_HEAD) {
                 r->method = NGX_HTTP_GET;
+                r->method_name = ngx_http_core_get_method;
             }
 
             ngx_http_internal_redirect(r, &uri, &args);