From 2bafd398334e4a802c3363c63c9a1275d8158a85 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 20 Nov 2008 17:09:15 +0000 Subject: r2193 merge: leave HEAD method while error_page redirection --- src/http/ngx_http_special_response.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/http') diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 3ef5c7cda..f644e7812 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -489,8 +489,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); } -- cgit