Mercurial > hg > nginx
diff src/http/ngx_http_special_response.c @ 477:ad1e9ebf93bb release-0.1.13
nginx-0.1.13-RELEASE import
*) 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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 21 Dec 2004 12:30:30 +0000 |
parents | 42d11f017717 |
children | 31ff3e943e16 |
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c Mon Dec 06 14:45:08 2004 +0000 +++ b/src/http/ngx_http_special_response.c Tue Dec 21 12:30:30 2004 +0000 @@ -232,15 +232,21 @@ 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); } }