~ubuntu-branches/debian/squeeze/nginx/squeeze

« back to all changes in this revision

Viewing changes to src/http/ngx_http_special_response.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-06-16 01:26:51 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100616012651-0kldmspg3i91mynk
Tags: 0.7.67-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
;
32
32
 
33
33
 
34
 
static u_char ngx_http_msie_stub[] =
35
 
"<!-- The padding to disable MSIE's friendly error page -->" CRLF
36
 
"<!-- The padding to disable MSIE's friendly error page -->" CRLF
37
 
"<!-- The padding to disable MSIE's friendly error page -->" CRLF
38
 
"<!-- The padding to disable MSIE's friendly error page -->" CRLF
39
 
"<!-- The padding to disable MSIE's friendly error page -->" CRLF
40
 
"<!-- The padding to disable MSIE's friendly error page -->" CRLF
 
34
static u_char ngx_http_msie_padding[] =
 
35
"<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF
 
36
"<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF
 
37
"<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF
 
38
"<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF
 
39
"<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF
 
40
"<!-- a padding to disable MSIE and Chrome friendly error page -->" CRLF
41
41
;
42
42
 
43
43
 
517
517
 
518
518
    r->err_status = overwrite;
519
519
 
520
 
    r->zero_in_uri = 0;
521
 
 
522
520
    if (ngx_http_complex_value(r, &err_page->value, &uri) != NGX_OK) {
523
521
        return NGX_ERROR;
524
522
    }
598
596
            r->headers_out.content_length_n = ngx_http_error_pages[err].len
599
597
                                              + len;
600
598
            if (clcf->msie_padding
601
 
                && r->headers_in.msie
 
599
                && (r->headers_in.msie || r->headers_in.chrome)
602
600
                && r->http_version >= NGX_HTTP_VERSION_10
603
601
                && err >= NGX_HTTP_LEVEL_300)
604
602
            {
605
603
                r->headers_out.content_length_n +=
606
 
                                                sizeof(ngx_http_msie_stub) - 1;
 
604
                                             sizeof(ngx_http_msie_padding) - 1;
607
605
                msie_padding = 1;
608
606
            }
609
607
 
671
669
        }
672
670
 
673
671
        b->memory = 1;
674
 
        b->pos = ngx_http_msie_stub;
675
 
        b->last = ngx_http_msie_stub + sizeof(ngx_http_msie_stub) - 1;
 
672
        b->pos = ngx_http_msie_padding;
 
673
        b->last = ngx_http_msie_padding + sizeof(ngx_http_msie_padding) - 1;
676
674
 
677
675
        out[1].next = &out[2];
678
676
        out[2].buf = b;