# HG changeset patch # User Igor Sysoev # Date 1227200955 0 # Node ID 6854b688fd7765bee5d46bd38b213c3e0bece3b2 # Parent d4df1c875351500cc019fc16e7ebcfc8b8f91158 r2193 merge: 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 @@ -489,8 +489,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); }