From 2b0c76cfbdfd660242f47ce66a4d54d30f9b23e8 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 27 Oct 2003 21:01:00 +0000 Subject: nginx-0.0.1-2003-10-28-00:01:00 import --- src/http/ngx_http_special_response.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/http/ngx_http_special_response.c') diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 035d4878f..c1a37f1ca 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -78,6 +78,14 @@ static char error_408_page[] = ; +static char error_413_page[] = +"" CRLF +"413 Request Entity Too Large" CRLF +"" CRLF +"

413 Request Entity Too Large

" CRLF +; + + static char error_414_page[] = "" CRLF "414 Request-URI Too Large" CRLF @@ -110,6 +118,14 @@ static char error_502_page[] = ; +static char error_503_page[] = +"" CRLF +"503 Service Temporarily Unavailable" CRLF +"" CRLF +"

503 Service Temporarily Unavailable

" CRLF +; + + static char error_504_page[] = "" CRLF "504 Gateway Time-out" CRLF @@ -137,7 +153,7 @@ static ngx_str_t error_pages[] = { ngx_null_string, /* 410 */ ngx_null_string, /* 411 */ ngx_null_string, /* 412 */ - ngx_null_string, /* 413 */ + ngx_string(error_413_page), ngx_string(error_414_page), ngx_null_string, /* 415 */ ngx_string(error_416_page), @@ -145,7 +161,7 @@ static ngx_str_t error_pages[] = { ngx_string(error_500_page), ngx_null_string, /* 501 */ ngx_string(error_502_page), - ngx_null_string, /* 503 */ + ngx_string(error_503_page), ngx_string(error_504_page) }; @@ -181,6 +197,7 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error) if (r->keepalive != 0) { switch (error) { case NGX_HTTP_BAD_REQUEST: + case NGX_HTTP_REQUEST_ENTITY_TOO_LARGE: case NGX_HTTP_REQUEST_URI_TOO_LARGE: case NGX_HTTP_INTERNAL_SERVER_ERROR: r->keepalive = 0; -- cgit