aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index abdf62482..a44c51c6a 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -312,6 +312,7 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
}
r->headers_out.status = error;
+ r->err_status = error;
if (r->keepalive != 0) {
switch (error) {
@@ -340,7 +341,7 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
- if (clcf->error_pages) {
+ if (r->uri_changes && clcf->error_pages) {
err_page = clcf->error_pages->elts;