diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-08-16 13:09:33 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-08-16 13:09:33 +0000 |
commit | ef316430492ce988b71f2d2839c12e3d3922a66b (patch) | |
tree | 214292c0f152fd374940002499011024280097a8 /src/http/ngx_http_special_response.c | |
parent | 2fb72a2205fd4a2bf450487032df43e5e1d9b14f (diff) | |
download | nginx-release-0.3.59.tar.gz nginx-release-0.3.59.zip |
nginx-0.3.59-RELEASE importrelease-0.3.59
*) Feature: now is possible to do several redirection using the
"error_page" directive.
*) Bugfix: the "dav_access" directive did not support three parameters.
*) Bugfix: the "error_page" directive did not changes the
"Content-Type" header line after the "X-Accel-Redirect" was used;
the bug had appeared in 0.3.58.
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r-- | src/http/ngx_http_special_response.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index dfff64107..abdf62482 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -336,9 +336,11 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error) } } + r->headers_out.content_type.len = 0; + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); - if (r->err_ctx == NULL && clcf->error_pages) { + if (clcf->error_pages) { err_page = clcf->error_pages->elts; @@ -346,7 +348,6 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error) if (err_page[i].status == error) { r->err_status = err_page[i].overwrite; - r->err_ctx = r->ctx; r->method = NGX_HTTP_GET; @@ -370,9 +371,10 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error) ngx_list_push(&r->headers_out.headers); if (r->headers_out.location) { - r->err_status = NGX_HTTP_MOVED_TEMPORARILY; error = NGX_HTTP_MOVED_TEMPORARILY; + r->err_status = NGX_HTTP_MOVED_TEMPORARILY; + r->headers_out.location->hash = 1; r->headers_out.location->key.len = sizeof("Location") - 1; r->headers_out.location->key.data = (u_char *) "Location"; |