diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-12-21 12:30:30 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-12-21 12:30:30 +0000 |
| commit | b1dfe478a03ad6919f174812951f6a2bec8befae (patch) | |
| tree | d8802484f8dbf5309b17a95b5fc9749627720a53 /src/http/ngx_http_special_response.c | |
| parent | 5275a8b3ac534ff36973801ec2aa6ce1214d7cc9 (diff) | |
| download | nginx-release-0.1.13.tar.gz nginx-release-0.1.13.tar.bz2 | |
nginx-0.1.13-RELEASE importrelease-0.1.13
*) Feature: the server_names_hash and server_names_hash_threshold
directives.
*) Bugfix: the *.domain.tld names in the "server_name" directive did
not work.
*) Bugfix: the %request_length log parameter logged the incorrect
length.
Diffstat (limited to 'src/http/ngx_http_special_response.c')
| -rw-r--r-- | src/http/ngx_http_special_response.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 1af8746e5..5702a855a 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -232,15 +232,21 @@ ngx_int_t ngx_http_special_response_handler(ngx_http_request_t *r, int error) clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); if (r->err_ctx == NULL && clcf->error_pages) { + err_page = clcf->error_pages->elts; + for (i = 0; i < clcf->error_pages->nelts; i++) { + if (err_page[i].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); } } |
