Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_special_response.c @ 488:829f9a66a659 NGINX_0_7_56
nginx 0.7.56
*) Feature: nginx/Windows supports IPv6 in a "listen" directive of the
HTTP module.
*) Bugfix: in ngx_http_image_filter_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 11 May 2009 00:00:00 +0400 |
parents | ed5e10fb40fc |
children | 499474178a11 |
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -446,20 +446,42 @@ ngx_http_special_response_handler(ngx_ht ngx_int_t -ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_int_t error) +ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_module_t *m, + ngx_int_t error) { - ngx_int_t rc; + void *ctx; + ngx_int_t rc; ngx_http_clean_header(r); + ctx = NULL; + + if (m) { + ctx = r->ctx[m->ctx_index]; + } + /* clear the modules contexts */ ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); + if (m) { + r->ctx[m->ctx_index] = ctx; + } + + r->filter_finalize = 1; + rc = ngx_http_special_response_handler(r, error); /* NGX_ERROR resets any pending data */ - return (rc == NGX_OK) ? NGX_ERROR : rc; + switch (rc) { + + case NGX_OK: + case NGX_DONE: + return NGX_ERROR; + + default: + return rc; + } }