mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 06:53:10 +00:00
do not change method while error redirection to named location
This commit is contained in:
parent
001a9cfa37
commit
15a20079a5
1 changed files with 4 additions and 3 deletions
|
|
@ -439,9 +439,6 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
|
|||
|
||||
r->err_status = err_page->overwrite;
|
||||
|
||||
r->method = NGX_HTTP_GET;
|
||||
r->method_name = ngx_http_get_name;
|
||||
|
||||
r->zero_in_uri = 0;
|
||||
|
||||
args = NULL;
|
||||
|
|
@ -494,6 +491,10 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
|
|||
}
|
||||
|
||||
if (uri->data[0] == '/') {
|
||||
|
||||
r->method = NGX_HTTP_GET;
|
||||
r->method_name = ngx_http_get_name;
|
||||
|
||||
return ngx_http_internal_redirect(r, uri, args);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue