Mercurial > hg > nginx-ranges
comparison src/http/ngx_http_special_response.c @ 558:e19e5f542878 NGINX_0_8_25
nginx 0.8.25
*) Change: now no message is written in an error log if a variable is
not found by $r->variable() method.
*) Feature: the ngx_http_degradation_module.
*) Feature: regular expression named captures.
*) Feature: now URI part is not required a "proxy_pass" directive if
variables are used.
*) Feature: now the "msie_padding" directive works for Chrome too.
*) Bugfix: a segmentation fault occurred in a worker process on low
memory condition; the bug had appeared in 0.8.18.
*) Bugfix: nginx sent gzipped responses to clients those do not support
gzip, if "gzip_static on" and "gzip_vary off"; the bug had appeared
in 0.8.16.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 16 Nov 2009 00:00:00 +0300 |
parents | 499474178a11 |
children | 8246d8a2c2be |
comparison
equal
deleted
inserted
replaced
557:91e4b06e1a01 | 558:e19e5f542878 |
---|---|
29 "</body>" CRLF | 29 "</body>" CRLF |
30 "</html>" CRLF | 30 "</html>" CRLF |
31 ; | 31 ; |
32 | 32 |
33 | 33 |
34 static u_char ngx_http_msie_stub[] = | 34 static u_char ngx_http_msie_padding[] = |
35 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 35 "<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF |
36 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 36 "<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF |
37 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 37 "<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF |
38 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 38 "<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF |
39 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 39 "<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF |
40 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 40 "<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF |
41 ; | 41 ; |
42 | 42 |
43 | 43 |
44 static u_char ngx_http_msie_refresh_head[] = | 44 static u_char ngx_http_msie_refresh_head[] = |
45 "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL="; | 45 "<html><head><meta http-equiv=\"Refresh\" content=\"0; URL="; |
596 if (!r->zero_body) { | 596 if (!r->zero_body) { |
597 if (ngx_http_error_pages[err].len) { | 597 if (ngx_http_error_pages[err].len) { |
598 r->headers_out.content_length_n = ngx_http_error_pages[err].len | 598 r->headers_out.content_length_n = ngx_http_error_pages[err].len |
599 + len; | 599 + len; |
600 if (clcf->msie_padding | 600 if (clcf->msie_padding |
601 && r->headers_in.msie | 601 && (r->headers_in.msie || r->headers_in.chrome) |
602 && r->http_version >= NGX_HTTP_VERSION_10 | 602 && r->http_version >= NGX_HTTP_VERSION_10 |
603 && err >= NGX_HTTP_LEVEL_300) | 603 && err >= NGX_HTTP_LEVEL_300) |
604 { | 604 { |
605 r->headers_out.content_length_n += | 605 r->headers_out.content_length_n += |
606 sizeof(ngx_http_msie_stub) - 1; | 606 sizeof(ngx_http_msie_padding) - 1; |
607 msie_padding = 1; | 607 msie_padding = 1; |
608 } | 608 } |
609 | 609 |
610 r->headers_out.content_type_len = sizeof("text/html") - 1; | 610 r->headers_out.content_type_len = sizeof("text/html") - 1; |
611 r->headers_out.content_type.len = sizeof("text/html") - 1; | 611 r->headers_out.content_type.len = sizeof("text/html") - 1; |
669 if (b == NULL) { | 669 if (b == NULL) { |
670 return NGX_ERROR; | 670 return NGX_ERROR; |
671 } | 671 } |
672 | 672 |
673 b->memory = 1; | 673 b->memory = 1; |
674 b->pos = ngx_http_msie_stub; | 674 b->pos = ngx_http_msie_padding; |
675 b->last = ngx_http_msie_stub + sizeof(ngx_http_msie_stub) - 1; | 675 b->last = ngx_http_msie_padding + sizeof(ngx_http_msie_padding) - 1; |
676 | 676 |
677 out[1].next = &out[2]; | 677 out[1].next = &out[2]; |
678 out[2].buf = b; | 678 out[2].buf = b; |
679 out[2].next = NULL; | 679 out[2].next = NULL; |
680 } | 680 } |