diff 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
line wrap: on
line diff
--- 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(ng
     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;
         }