diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-06-16 19:32:11 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-06-16 19:32:11 +0400 |
commit | 2f65722941903cfb5b4819bbf32b61ed1d330749 (patch) | |
tree | 77fb2186a9afef9acdbc77e60e43a82fc4dae122 /src/http/ngx_http_special_response.c | |
parent | d09f7a1e9aa5816493e2fef93074383d95140c13 (diff) |
nginx-0.0.7-2004-06-16-19:32:11 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, 7 insertions, 7 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 2e2664081..70a6bb84d 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -177,10 +177,10 @@ static ngx_str_t error_pages[] = { }; -int ngx_http_special_response_handler(ngx_http_request_t *r, int error) +ngx_int_t ngx_http_special_response_handler(ngx_http_request_t *r, int error) { ngx_int_t rc; - ngx_uint_t err, i; + ngx_uint_t err, i, msie_padding; ngx_buf_t *b; ngx_chain_t *out, **ll, *cl; ngx_http_err_page_t *err_page; @@ -248,16 +248,20 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error) } } + msie_padding = 0; + if (error_pages[err].len) { r->headers_out.content_length_n = error_pages[err].len + sizeof(error_tail) - 1; if (clcf->msie_padding + && r->headers_in.msie && 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; + msie_padding = 1; } if (!(r->headers_out.content_type = @@ -314,11 +318,7 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error) ngx_alloc_link_and_set_buf(cl, b, r->pool, NGX_ERROR); ngx_chain_add_link(out, ll, cl); - if (clcf->msie_padding - && r->http_version >= NGX_HTTP_VERSION_10 - && error >= NGX_HTTP_BAD_REQUEST - && error != NGX_HTTP_REQUEST_URI_TOO_LARGE) - { + if (msie_padding) { if (!(b = ngx_calloc_buf(r->pool))) { return NGX_ERROR; } |