diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-10-12 20:49:16 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-10-12 20:49:16 +0400 |
commit | 0a280a3fc081877bc45cbdc0511a8cc42675213c (patch) | |
tree | b5ea17e3be5eab555cf40f6304338a88bd641527 /src/http/ngx_http_special_response.c | |
parent | b3e73d869ecef9248468e0ccc2d7d0abdbee495c (diff) |
nginx-0.0.1-2003-10-12-20:49:16 import
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r-- | src/http/ngx_http_special_response.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 825d8bc97..0e16c987d 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -22,6 +22,14 @@ static char msie_stub[] = ; +static char error_301_page[] = +"<html>" CRLF +"<head><title>301 Moved Permanently</title></head>" CRLF +"<body bgcolor=\"white\">" CRLF +"<center><h1>301 Moved Permanently</h1></center>" CRLF +; + + static char error_302_page[] = "<html>" CRLF "<head><title>302 Found</title></head>" CRLF @@ -111,8 +119,8 @@ static char error_504_page[] = static ngx_str_t error_pages[] = { - ngx_null_string, /* 300 */ - ngx_null_string, /* 301 */ + /* ngx_null_string, */ /* 300 */ + ngx_string(error_301_page), ngx_string(error_302_page), ngx_null_string, /* 303 */ @@ -224,7 +232,11 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error) h->pos = error_tail; h->last = error_tail + sizeof(error_tail) - 1; - if (/* STUB: "msie_padding on/off" */ 1) { + if (/* STUB: "msie_padding on/off" */ 1 + && r->http_version >= NGX_HTTP_VERSION_10 + && error >= NGX_HTTP_BAD_REQUEST) + { + if (ngx_http_output_filter(r, h) == NGX_ERROR) { return NGX_ERROR; } |