# HG changeset patch # User Igor Sysoev # Date 1219172146 0 # Node ID 798ecc4fe75c2a53402df19a294f357c318d9448 # Parent 808547aa8c1287f46a36a91af89db52ba30d4224 leave HEAD method while error_page redirection diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c --- 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_reques 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); }