diff options
Diffstat (limited to 'src/http/ngx_http_special_response.c')
| -rw-r--r-- | src/http/ngx_http_special_response.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 275ae95c9..4eb8899de 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -214,7 +214,11 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error) err_page = clcf->error_pages->elts; for (i = 0; i < clcf->error_pages->nelts; i++) { if (err_page[i].code == error) { - r->err_status = error; + if (err_page[i].overwrite) { + r->err_status = err_page[i].overwrite; + } else { + r->err_status = error; + } r->err_ctx = r->ctx; return ngx_http_internal_redirect(r, &err_page[i].uri, NULL); } |
