Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 179:9f3a78b06c48
nginx-0.0.1-2003-11-11-21:13:43 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 11 Nov 2003 18:13:43 +0000 |
parents | a8ff48d26cca |
children | 4c698194c56d |
line wrap: on
line diff
--- 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_reques 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_ } } - /* clear the modules contexts */ + if (r->err_ctx) { - if (r->error_page) { - r->err_status = r->headers_out.status; - r->err_ctx = r->ctx; + /* allocate the new modules contexts */ + 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); }