Mercurial > hg > nginx
comparison src/http/ngx_http_special_response.c @ 144:ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 12 Oct 2003 16:49:16 +0000 |
parents | 5526213be452 |
children | 58557d0cccd1 |
comparison
equal
deleted
inserted
replaced
143:5526213be452 | 144:ef8c87afcfc5 |
---|---|
20 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 20 "<!-- The padding to disable MSIE's friendly error page -->" CRLF |
21 "<!-- The padding to disable MSIE's friendly error page -->" CRLF | 21 "<!-- The padding to disable MSIE's friendly error page -->" CRLF |
22 ; | 22 ; |
23 | 23 |
24 | 24 |
25 static char error_301_page[] = | |
26 "<html>" CRLF | |
27 "<head><title>301 Moved Permanently</title></head>" CRLF | |
28 "<body bgcolor=\"white\">" CRLF | |
29 "<center><h1>301 Moved Permanently</h1></center>" CRLF | |
30 ; | |
31 | |
32 | |
25 static char error_302_page[] = | 33 static char error_302_page[] = |
26 "<html>" CRLF | 34 "<html>" CRLF |
27 "<head><title>302 Found</title></head>" CRLF | 35 "<head><title>302 Found</title></head>" CRLF |
28 "<body bgcolor=\"white\">" CRLF | 36 "<body bgcolor=\"white\">" CRLF |
29 "<center><h1>302 Found</h1></center>" CRLF | 37 "<center><h1>302 Found</h1></center>" CRLF |
109 "<center><h1>504 Gateway Time-out</h1></center>" CRLF | 117 "<center><h1>504 Gateway Time-out</h1></center>" CRLF |
110 ; | 118 ; |
111 | 119 |
112 | 120 |
113 static ngx_str_t error_pages[] = { | 121 static ngx_str_t error_pages[] = { |
114 ngx_null_string, /* 300 */ | 122 /* ngx_null_string, */ /* 300 */ |
115 ngx_null_string, /* 301 */ | 123 ngx_string(error_301_page), |
116 ngx_string(error_302_page), | 124 ngx_string(error_302_page), |
117 ngx_null_string, /* 303 */ | 125 ngx_null_string, /* 303 */ |
118 | 126 |
119 ngx_string(error_400_page), | 127 ngx_string(error_400_page), |
120 ngx_null_string, /* 401 */ | 128 ngx_null_string, /* 401 */ |
222 | 230 |
223 h->type = NGX_HUNK_MEMORY|NGX_HUNK_IN_MEMORY; | 231 h->type = NGX_HUNK_MEMORY|NGX_HUNK_IN_MEMORY; |
224 h->pos = error_tail; | 232 h->pos = error_tail; |
225 h->last = error_tail + sizeof(error_tail) - 1; | 233 h->last = error_tail + sizeof(error_tail) - 1; |
226 | 234 |
227 if (/* STUB: "msie_padding on/off" */ 1) { | 235 if (/* STUB: "msie_padding on/off" */ 1 |
236 && r->http_version >= NGX_HTTP_VERSION_10 | |
237 && error >= NGX_HTTP_BAD_REQUEST) | |
238 { | |
239 | |
228 if (ngx_http_output_filter(r, h) == NGX_ERROR) { | 240 if (ngx_http_output_filter(r, h) == NGX_ERROR) { |
229 return NGX_ERROR; | 241 return NGX_ERROR; |
230 } | 242 } |
231 | 243 |
232 ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR); | 244 ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR); |