Mercurial > hg > nginx
diff src/http/ngx_http_special_response.c @ 331:f168a88e93f7
nginx-0.0.3-2004-05-04-21:56:58 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 04 May 2004 17:56:58 +0000 |
parents | 8733703a37f3 |
children | d4241d7787fe |
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -240,8 +240,15 @@ int ngx_http_special_response_handler(ng if (error_pages[err].len) { r->headers_out.content_length_n = error_pages[err].len - + sizeof(error_tail) - 1 - + sizeof(msie_stub) - 1; + + sizeof(error_tail) - 1; + + if (clcf->msie_padding + && r->http_version >= NGX_HTTP_VERSION_10 + && error >= NGX_HTTP_BAD_REQUEST + && error != NGX_HTTP_REQUEST_URI_TOO_LARGE) + { + r->headers_out.content_length_n += sizeof(msie_stub) - 1; + } if (!(r->headers_out.content_type = ngx_http_add_header(&r->headers_out, ngx_http_headers_out))) @@ -300,8 +307,7 @@ int ngx_http_special_response_handler(ng if (clcf->msie_padding && r->http_version >= NGX_HTTP_VERSION_10 && error >= NGX_HTTP_BAD_REQUEST - && error != NGX_HTTP_REQUEST_URI_TOO_LARGE - ) + && error != NGX_HTTP_REQUEST_URI_TOO_LARGE) { if (!(h = ngx_calloc_hunk(r->pool))) { return NGX_ERROR;