]> git.kaiwu.me - nginx.git/commitdiff
NGX_HTTP_PRECONDITION_FAILED
authorIgor Sysoev <igor@sysoev.ru>
Thu, 18 Jan 2007 20:51:51 +0000 (20:51 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 18 Jan 2007 20:51:51 +0000 (20:51 +0000)
src/http/ngx_http_header_filter_module.c
src/http/ngx_http_request.h
src/http/ngx_http_special_response.c

index 78682c5a17d4b6bdc4f364bafc798fd61e7aa0e2..fedb33c3bb7b16d066717def04259fdd66e08d2a 100644 (file)
@@ -87,7 +87,7 @@ static ngx_str_t ngx_http_status_lines[] = {
     ngx_string("409 Conflict"),
     ngx_string("410 Gone"),
     ngx_string("411 Length Required"),
-    ngx_null_string,  /* "412 Precondition Failed" */
+    ngx_string("412 Precondition Failed"),
     ngx_string("413 Request Entity Too Large"),
     ngx_null_string,  /* "414 Request-URI Too Large", but we never send it
                        * because we treat such requests as the HTTP/0.9
index 5cdcb94989ec47ce30948faaa47cff651e4fdd2a..22e17ee373300d18b359ad209f3f101fa129fef1 100644 (file)
@@ -77,6 +77,7 @@
 #define NGX_HTTP_REQUEST_TIME_OUT          408
 #define NGX_HTTP_CONFLICT                  409
 #define NGX_HTTP_LENGTH_REQUIRED           411
+#define NGX_HTTP_PRECONDITION_FAILED       412
 #define NGX_HTTP_REQUEST_ENTITY_TOO_LARGE  413
 #define NGX_HTTP_REQUEST_URI_TOO_LARGE     414
 #define NGX_HTTP_UNSUPPORTED_MEDIA_TYPE    415
index c8190ed18972bce101577f1a203fea15613d1e8b..bb72079a9b196fc3238013ac76f9ad340ae44a50 100644 (file)
@@ -139,6 +139,14 @@ static char error_411_page[] =
 ;
 
 
+static char error_412_page[] =
+"<html>" CRLF
+"<head><title>412 Precondition Failed</title></head>" CRLF
+"<body bgcolor=\"white\">" CRLF
+"<center><h1>412 Precondition Failed</h1></center>" CRLF
+;
+
+
 static char error_413_page[] =
 "<html>" CRLF
 "<head><title>413 Request Entity Too Large</title></head>" CRLF
@@ -274,7 +282,7 @@ static ngx_str_t error_pages[] = {
     ngx_string(error_409_page),
     ngx_string(error_410_page),
     ngx_string(error_411_page),
-    ngx_null_string,             /* 412 */
+    ngx_string(error_412_page),
     ngx_string(error_413_page),
     ngx_string(error_414_page),
     ngx_string(error_415_page),