]> git.kaiwu.me - nginx.git/commitdiff
fix: "return" always overrode "error_page" response code
authorIgor Sysoev <igor@sysoev.ru>
Mon, 2 Oct 2006 08:37:11 +0000 (08:37 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 2 Oct 2006 08:37:11 +0000 (08:37 +0000)
src/http/modules/ngx_http_rewrite_module.c

index 6db1bc06f9e93be293b87c2f10db21122aff9e57..31923755dab44339ba84eb5d93db23503bc31519 100644 (file)
@@ -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;
 }