diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-11 18:13:43 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-11 18:13:43 +0000 |
commit | 27c30f9919ed695ab718c3365a445d47a14fd80f (patch) | |
tree | b8bd50e2fcecf477f1bb05d61fc7626c06a4442b /src/http/ngx_http_core_module.c | |
parent | d59a047a7070dc6af13b2e35c097efccc8ce38d0 (diff) | |
download | nginx-27c30f9919ed695ab718c3365a445d47a14fd80f.tar.gz nginx-27c30f9919ed695ab718c3365a445d47a14fd80f.zip |
nginx-0.0.1-2003-11-11-21:13:43 import
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 3a0ec8bfc..3f19b7833 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -429,7 +429,7 @@ int ngx_http_send_header(ngx_http_request_t *r) return NGX_OK; } - if (r->err_status) { + if (r->err_ctx) { r->headers_out.status = r->err_status; r->headers_out.status_line.len = 0; } @@ -499,17 +499,19 @@ int ngx_http_internal_redirect(ngx_http_request_t *r, } } - /* clear the modules contexts */ + if (r->err_ctx) { + + /* allocate the new modules contexts */ - if (r->error_page) { - r->err_status = r->headers_out.status; - r->err_ctx = r->ctx; r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); if (r->ctx == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } } else { + + /* clear the modules contexts */ + ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); } |