diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c index 78682c5a1..fedb33c3b 100644 --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -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 diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 5cdcb9498..22e17ee37 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -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 diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index c8190ed18..bb72079a9 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -139,6 +139,14 @@ static char error_411_page[] = ; +static char error_412_page[] = +"" CRLF +"