diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-05-08 14:52:50 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-05-08 14:52:50 +0000 |
| commit | ad0b9303d0996f0bb91c64e150e8dd6029631ae1 (patch) | |
| tree | 15e051adfe94eccf38d0af19119016c8b6cce5fb /src/http/ngx_http_special_response.c | |
| parent | 8bb39121fc66b35c83132fe2c05dd5b995daeecf (diff) | |
| download | nginx-ad0b9303d0996f0bb91c64e150e8dd6029631ae1.tar.gz nginx-ad0b9303d0996f0bb91c64e150e8dd6029631ae1.tar.bz2 | |
allow to pass image filter errors via the same location where the filter is set
Diffstat (limited to 'src/http/ngx_http_special_response.c')
| -rw-r--r-- | src/http/ngx_http_special_response.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 8f0a2078d..9bf99162b 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -446,15 +446,25 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error) 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); + 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); |
