diff src/http/ngx_http_special_response.c @ 2192:798ecc4fe75c

leave HEAD method while error_page redirection
author Igor Sysoev <igor@sysoev.ru>
date Tue, 19 Aug 2008 18:55:46 +0000
parents 808547aa8c12
children 26d9d4a41e91
line wrap: on
line diff
--- 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);
     }