mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Upstream: fixed changing method on X-Accel-Redirect.
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.
This commit is contained in:
parent
65af9b8be2
commit
af647a3da2
@ -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) {
|
if (r->method != NGX_HTTP_HEAD) {
|
||||||
r->method = NGX_HTTP_GET;
|
r->method = NGX_HTTP_GET;
|
||||||
|
r->method_name = ngx_http_core_get_method;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_http_internal_redirect(r, &uri, &args);
|
ngx_http_internal_redirect(r, &uri, &args);
|
||||||
|
Loading…
Reference in New Issue
Block a user