From 15a20079a5c0619510fa2bbc73abbd38976d5f67 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 10 Mar 2008 14:36:42 +0000 Subject: do not change method while error redirection to named location --- src/http/ngx_http_special_response.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/http/ngx_http_special_response.c') diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 5671f9bb7..741a9b1d4 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -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); } -- cgit