summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-01-20 10:37:58 +0000
committerIgor Sysoev <igor@sysoev.ru>2011-01-20 10:37:58 +0000
commit26cf2c96ea50f86c273411a2a4a1514f63800884 (patch)
treef0de470698e9ff7c9392ad816434c164d9c00bb0 /src/http/ngx_http_special_response.c
parent6586e821082d291c45068b208fad6ed360d95b44 (diff)
downloadnginx-26cf2c96ea50f86c273411a2a4a1514f63800884.tar.gz
nginx-26cf2c96ea50f86c273411a2a4a1514f63800884.tar.bz2
introduce 494 code "Request Header Too Large"
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 487c65a2f..ed87fd068 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -201,6 +201,16 @@ static char ngx_http_error_416_page[] =
;
+static char ngx_http_error_494_page[] =
+"<html>" CRLF
+"<head><title>400 Request Header Or Cookie Too Large</title></head>"
+CRLF
+"<body bgcolor=\"white\">" CRLF
+"<center><h1>400 Bad Request</h1></center>" CRLF
+"<center>Request Header Or Cookie Too Large</center>" CRLF
+;
+
+
static char ngx_http_error_495_page[] =
"<html>" CRLF
"<head><title>400 The SSL certificate error</title></head>"
@@ -315,6 +325,7 @@ static ngx_str_t ngx_http_error_pages[] = {
#define NGX_HTTP_LAST_LEVEL_400 417
#define NGX_HTTP_LEVEL_400 (NGX_HTTP_LAST_LEVEL_400 - 400)
+ ngx_string(ngx_http_error_494_page), /* 494, request header too large */
ngx_string(ngx_http_error_495_page), /* 495, https certificate error */
ngx_string(ngx_http_error_496_page), /* 496, https no certificate */
ngx_string(ngx_http_error_497_page), /* 497, http to https */
@@ -440,6 +451,7 @@ ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
case NGX_HTTP_TO_HTTPS:
case NGX_HTTPS_CERT_ERROR:
case NGX_HTTPS_NO_CERT:
+ case NGX_HTTP_REQUEST_HEADER_TOO_LARGE:
r->err_status = NGX_HTTP_BAD_REQUEST;
break;
}