From: Igor Sysoev Date: Mon, 2 Oct 2006 08:37:11 +0000 (+0000) Subject: fix: "return" always overrode "error_page" response code X-Git-Tag: release-0.4.4~6 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=97c7e1a98621857a5eb2d44c477f7f6384417b52;p=nginx.git fix: "return" always overrode "error_page" response code --- diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c index 6db1bc06f..31923755d 100644 --- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -178,7 +178,11 @@ ngx_http_rewrite_handler(ngx_http_request_t *r) code(e); } - return e->status; + if (r->err_status == 0) { + return e->status; + } + + return r->err_status; }