comparison src/http/ngx_http_special_response.c @ 238:a528ae0fe909 NGINX_0_4_4

nginx 0.4.4 *) Feature: the $scheme variable. *) Feature: the "expires" directive supports the "max" parameter. *) Feature: the "include" directive supports the "*" mask. Thanks to Jonathan Dance. *) Bugfix: the "return" directive always overrode the "error_page" response code redirected by the "error_page" directive. *) Bugfix: a segmentation fault occurred if zero-length body was in PUT method. *) Bugfix: the redirect was changed incorrectly if the variables were used in the "proxy_redirect" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 02 Oct 2006 00:00:00 +0400
parents c982febb7588
children c5c2b2883984
comparison
equal deleted inserted replaced
237:302a8e8b4ae7 238:a528ae0fe909
453 } 453 }
454 } 454 }
455 455
456 msie_padding = 0; 456 msie_padding = 0;
457 457
458 if (error_pages[err].len) { 458 if (!r->zero_body) {
459 r->headers_out.content_length_n = error_pages[err].len 459 if (error_pages[err].len) {
460 + sizeof(error_tail) - 1; 460 r->headers_out.content_length_n = error_pages[err].len
461 461 + sizeof(error_tail) - 1;
462 if (clcf->msie_padding 462
463 && r->headers_in.msie 463 if (clcf->msie_padding
464 && r->http_version >= NGX_HTTP_VERSION_10 464 && r->headers_in.msie
465 && error >= NGX_HTTP_BAD_REQUEST 465 && r->http_version >= NGX_HTTP_VERSION_10
466 && error != NGX_HTTP_REQUEST_URI_TOO_LARGE) 466 && error >= NGX_HTTP_BAD_REQUEST
467 { 467 && error != NGX_HTTP_REQUEST_URI_TOO_LARGE)
468 r->headers_out.content_length_n += sizeof(ngx_http_msie_stub) - 1; 468 {
469 msie_padding = 1; 469 r->headers_out.content_length_n +=
470 } 470 sizeof(ngx_http_msie_stub) - 1;
471 471 msie_padding = 1;
472 r->headers_out.content_type.len = sizeof("text/html") - 1; 472 }
473 r->headers_out.content_type.data = (u_char *) "text/html"; 473
474 r->headers_out.content_type.len = sizeof("text/html") - 1;
475 r->headers_out.content_type.data = (u_char *) "text/html";
476
477 } else {
478 r->headers_out.content_length_n = -1;
479 }
474 480
475 } else { 481 } else {
476 r->headers_out.content_length_n = -1; 482 r->headers_out.content_length_n = 0;
483 err = 0;
477 } 484 }
478 485
479 if (r->headers_out.content_length) { 486 if (r->headers_out.content_length) {
480 r->headers_out.content_length->hash = 0; 487 r->headers_out.content_length->hash = 0;
481 r->headers_out.content_length = NULL; 488 r->headers_out.content_length = NULL;