diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2008-03-10 14:36:42 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2008-03-10 14:36:42 +0000 |
| commit | 15a20079a5c0619510fa2bbc73abbd38976d5f67 (patch) | |
| tree | 2852099e7c69bf5059f0526569d899aafad695e3 | |
| parent | 001a9cfa37b47f323c4c9197b58b5d92a1dabfe9 (diff) | |
| download | nginx-15a20079a5c0619510fa2bbc73abbd38976d5f67.tar.gz nginx-15a20079a5c0619510fa2bbc73abbd38976d5f67.tar.bz2 | |
do not change method while error redirection to named location
| -rw-r--r-- | src/http/ngx_http_special_response.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |
