comparison src/http/ngx_http_special_response.c @ 484:ed5e10fb40fc NGINX_0_7_54

nginx 0.7.54 *) Feature: the ngx_http_image_filter_module. *) Feature: the "proxy_ignore_headers" and "fastcgi_ignore_headers" directives. *) Bugfix: a segmentation fault might occur in worker process, if an "open_file_cache_errors off" directive was used; the bug had appeared in 0.7.53. *) Bugfix: the "port_in_redirect off" directive did not work; the bug had appeared in 0.7.39. *) Bugfix: improve handling of "select" method errors. *) Bugfix: of "select() failed (10022: ...)" error in nginx/Windows. *) Bugfix: in error text descriptions in nginx/Windows; the bug had appeared in 0.7.53.
author Igor Sysoev <http://sysoev.ru>
date Fri, 01 May 2009 00:00:00 +0400
parents f2c6a7373274
children 829f9a66a659
comparison
equal deleted inserted replaced
483:0a2f4b42ddad 484:ed5e10fb40fc
443 443
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
449 ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_int_t error)
450 {
451 ngx_int_t rc;
452
453 ngx_http_clean_header(r);
454
455 /* clear the modules contexts */
456 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);
457
458 rc = ngx_http_special_response_handler(r, error);
459
460 /* NGX_ERROR resets any pending data */
461
462 return (rc == NGX_OK) ? NGX_ERROR : rc;
463 }
464
465
466 void
467 ngx_http_clean_header(ngx_http_request_t *r)
468 {
469 ngx_memzero(&r->headers_out.status,
470 sizeof(ngx_http_headers_out_t)
471 - offsetof(ngx_http_headers_out_t, status));
472
473 r->headers_out.headers.part.nelts = 0;
474 r->headers_out.headers.part.next = NULL;
475 r->headers_out.headers.last = &r->headers_out.headers.part;
476
477 r->headers_out.content_length_n = -1;
478 r->headers_out.last_modified_time = -1;
479 }
480
481
448 static ngx_int_t 482 static ngx_int_t
449 ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page) 483 ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
450 { 484 {
451 ngx_int_t overwrite; 485 ngx_int_t overwrite;
452 ngx_str_t uri, args; 486 ngx_str_t uri, args;