Mercurial > hg > nginx-vendor-current
comparison 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 |
comparison
equal
deleted
inserted
replaced
487:e98b980b4fe7 | 488:829f9a66a659 |
---|---|
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 ctx = NULL; | |
458 | |
459 if (m) { | |
460 ctx = r->ctx[m->ctx_index]; | |
461 } | |
454 | 462 |
455 /* clear the modules contexts */ | 463 /* clear the modules contexts */ |
456 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); | 464 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); |
457 | 465 |
466 if (m) { | |
467 r->ctx[m->ctx_index] = ctx; | |
468 } | |
469 | |
470 r->filter_finalize = 1; | |
471 | |
458 rc = ngx_http_special_response_handler(r, error); | 472 rc = ngx_http_special_response_handler(r, error); |
459 | 473 |
460 /* NGX_ERROR resets any pending data */ | 474 /* NGX_ERROR resets any pending data */ |
461 | 475 |
462 return (rc == NGX_OK) ? NGX_ERROR : rc; | 476 switch (rc) { |
477 | |
478 case NGX_OK: | |
479 case NGX_DONE: | |
480 return NGX_ERROR; | |
481 | |
482 default: | |
483 return rc; | |
484 } | |
463 } | 485 } |
464 | 486 |
465 | 487 |
466 void | 488 void |
467 ngx_http_clean_header(ngx_http_request_t *r) | 489 ngx_http_clean_header(ngx_http_request_t *r) |