do not change method while error redirection to named location
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 5671f9b..741a9b1 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -439,9 +439,6 @@
 
     r->err_status = err_page->overwrite;
 
-    r->method = NGX_HTTP_GET;
-    r->method_name = ngx_http_get_name;
-
     r->zero_in_uri = 0;
 
     args = NULL;
@@ -494,6 +491,10 @@
     }
 
     if (uri->data[0] == '/') {
+
+        r->method = NGX_HTTP_GET;
+        r->method_name = ngx_http_get_name;
+
         return ngx_http_internal_redirect(r, uri, args);
     }