aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_rewrite_module.c6
1 files changed, 5 insertions, 1 deletions
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;
}