diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-05-04 21:56:58 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-05-04 21:56:58 +0400 |
commit | 5aeeb2dc4687c38386f2440a56f29758a53b5551 (patch) | |
tree | 4e69e36b1fd8956d7f5cf008ce244d6d520cdbdf /src/http/ngx_http_special_response.c | |
parent | 16abdfeda0509afbb220e75399f54b330b1a460c (diff) |
nginx-0.0.3-2004-05-04-21:56:58 import
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r-- | src/http/ngx_http_special_response.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index ba8796925..55f4bb3ac 100644 --- 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(ngx_http_request_t *r, int error) 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(ngx_http_request_t *r, int error) 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; |