Mercurial > hg > nginx
comparison src/http/ngx_http_special_response.c @ 2821:26e06e009ced
allow to pass image filter errors via the same location where the filter is set
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 08 May 2009 14:52:50 +0000 |
parents | 43fe53832da7 |
children | 5364c3419a62 |
comparison
equal
deleted
inserted
replaced
2820:5eb4e2d2e9fa | 2821:26e06e009ced |
---|---|
444 return ngx_http_send_special_response(r, clcf, err); | 444 return ngx_http_send_special_response(r, clcf, err); |
445 } | 445 } |
446 | 446 |
447 | 447 |
448 ngx_int_t | 448 ngx_int_t |
449 ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_int_t error) | 449 ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_module_t *m, |
450 ngx_int_t error) | |
450 { | 451 { |
451 ngx_int_t rc; | 452 void *ctx; |
453 ngx_int_t rc; | |
452 | 454 |
453 ngx_http_clean_header(r); | 455 ngx_http_clean_header(r); |
456 | |
457 if (m) { | |
458 ctx = r->ctx[m->ctx_index]; | |
459 } | |
454 | 460 |
455 /* clear the modules contexts */ | 461 /* clear the modules contexts */ |
456 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); | 462 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); |
463 | |
464 if (m) { | |
465 r->ctx[m->ctx_index] = ctx; | |
466 } | |
457 | 467 |
458 r->filter_finalize = 1; | 468 r->filter_finalize = 1; |
459 | 469 |
460 rc = ngx_http_special_response_handler(r, error); | 470 rc = ngx_http_special_response_handler(r, error); |
461 | 471 |