mirror of
https://github.com/nginx/nginx.git
synced 2025-06-09 19:12:47 +08:00
leave HEAD method while error_page redirection
This commit is contained in:
parent
c9482c6ead
commit
1a8cbb8663
@ -490,8 +490,10 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
|
|||||||
|
|
||||||
if (uri->data[0] == '/') {
|
if (uri->data[0] == '/') {
|
||||||
|
|
||||||
|
if (r->method != NGX_HTTP_HEAD) {
|
||||||
r->method = NGX_HTTP_GET;
|
r->method = NGX_HTTP_GET;
|
||||||
r->method_name = ngx_http_get_name;
|
r->method_name = ngx_http_get_name;
|
||||||
|
}
|
||||||
|
|
||||||
return ngx_http_internal_redirect(r, uri, args);
|
return ngx_http_internal_redirect(r, uri, args);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user