comparison 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
comparison
equal deleted inserted replaced
330:377a955421dc 331:f168a88e93f7
238 err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 3 + 17; 238 err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 3 + 17;
239 } 239 }
240 240
241 if (error_pages[err].len) { 241 if (error_pages[err].len) {
242 r->headers_out.content_length_n = error_pages[err].len 242 r->headers_out.content_length_n = error_pages[err].len
243 + sizeof(error_tail) - 1 243 + sizeof(error_tail) - 1;
244 + sizeof(msie_stub) - 1; 244
245 if (clcf->msie_padding
246 && r->http_version >= NGX_HTTP_VERSION_10
247 && error >= NGX_HTTP_BAD_REQUEST
248 && error != NGX_HTTP_REQUEST_URI_TOO_LARGE)
249 {
250 r->headers_out.content_length_n += sizeof(msie_stub) - 1;
251 }
245 252
246 if (!(r->headers_out.content_type = 253 if (!(r->headers_out.content_type =
247 ngx_http_add_header(&r->headers_out, ngx_http_headers_out))) 254 ngx_http_add_header(&r->headers_out, ngx_http_headers_out)))
248 { 255 {
249 return NGX_ERROR; 256 return NGX_ERROR;
298 ngx_chain_add_link(out, ll, cl); 305 ngx_chain_add_link(out, ll, cl);
299 306
300 if (clcf->msie_padding 307 if (clcf->msie_padding
301 && r->http_version >= NGX_HTTP_VERSION_10 308 && r->http_version >= NGX_HTTP_VERSION_10
302 && error >= NGX_HTTP_BAD_REQUEST 309 && error >= NGX_HTTP_BAD_REQUEST
303 && error != NGX_HTTP_REQUEST_URI_TOO_LARGE 310 && error != NGX_HTTP_REQUEST_URI_TOO_LARGE)
304 )
305 { 311 {
306 if (!(h = ngx_calloc_hunk(r->pool))) { 312 if (!(h = ngx_calloc_hunk(r->pool))) {
307 return NGX_ERROR; 313 return NGX_ERROR;
308 } 314 }
309 h->type = NGX_HUNK_MEMORY|NGX_HUNK_IN_MEMORY; 315 h->type = NGX_HUNK_MEMORY|NGX_HUNK_IN_MEMORY;