From 1a8cbb8663e22b58c543c4ae884c209a3d739e0d Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 19 Aug 2008 18:55:46 +0000 Subject: [PATCH] leave HEAD method while error_page redirection --- src/http/ngx_http_special_response.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 4e045c701..849326839 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -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] == '/') { - r->method = NGX_HTTP_GET; - r->method_name = ngx_http_get_name; + if (r->method != NGX_HTTP_HEAD) { + r->method = NGX_HTTP_GET; + r->method_name = ngx_http_get_name; + } return ngx_http_internal_redirect(r, uri, args); }