Mercurial > hg > nginx-quic
comparison src/http/ngx_http_special_response.c @ 3848:de59ad6bf557
introduce 494 code "Request Header Too Large"
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Jan 2011 10:37:58 +0000 |
parents | 11c68a5ed419 |
children | 39ad979cd31e |
comparison
equal
deleted
inserted
replaced
3847:1df5620b9cd6 | 3848:de59ad6bf557 |
---|---|
196 static char ngx_http_error_416_page[] = | 196 static char ngx_http_error_416_page[] = |
197 "<html>" CRLF | 197 "<html>" CRLF |
198 "<head><title>416 Requested Range Not Satisfiable</title></head>" CRLF | 198 "<head><title>416 Requested Range Not Satisfiable</title></head>" CRLF |
199 "<body bgcolor=\"white\">" CRLF | 199 "<body bgcolor=\"white\">" CRLF |
200 "<center><h1>416 Requested Range Not Satisfiable</h1></center>" CRLF | 200 "<center><h1>416 Requested Range Not Satisfiable</h1></center>" CRLF |
201 ; | |
202 | |
203 | |
204 static char ngx_http_error_494_page[] = | |
205 "<html>" CRLF | |
206 "<head><title>400 Request Header Or Cookie Too Large</title></head>" | |
207 CRLF | |
208 "<body bgcolor=\"white\">" CRLF | |
209 "<center><h1>400 Bad Request</h1></center>" CRLF | |
210 "<center>Request Header Or Cookie Too Large</center>" CRLF | |
201 ; | 211 ; |
202 | 212 |
203 | 213 |
204 static char ngx_http_error_495_page[] = | 214 static char ngx_http_error_495_page[] = |
205 "<html>" CRLF | 215 "<html>" CRLF |
313 ngx_string(ngx_http_error_416_page), | 323 ngx_string(ngx_http_error_416_page), |
314 | 324 |
315 #define NGX_HTTP_LAST_LEVEL_400 417 | 325 #define NGX_HTTP_LAST_LEVEL_400 417 |
316 #define NGX_HTTP_LEVEL_400 (NGX_HTTP_LAST_LEVEL_400 - 400) | 326 #define NGX_HTTP_LEVEL_400 (NGX_HTTP_LAST_LEVEL_400 - 400) |
317 | 327 |
328 ngx_string(ngx_http_error_494_page), /* 494, request header too large */ | |
318 ngx_string(ngx_http_error_495_page), /* 495, https certificate error */ | 329 ngx_string(ngx_http_error_495_page), /* 495, https certificate error */ |
319 ngx_string(ngx_http_error_496_page), /* 496, https no certificate */ | 330 ngx_string(ngx_http_error_496_page), /* 496, https no certificate */ |
320 ngx_string(ngx_http_error_497_page), /* 497, http to https */ | 331 ngx_string(ngx_http_error_497_page), /* 497, http to https */ |
321 ngx_string(ngx_http_error_404_page), /* 498, canceled */ | 332 ngx_string(ngx_http_error_404_page), /* 498, canceled */ |
322 ngx_null_string, /* 499, client has closed connection */ | 333 ngx_null_string, /* 499, client has closed connection */ |
438 + NGX_HTTP_LEVEL_400; | 449 + NGX_HTTP_LEVEL_400; |
439 switch (error) { | 450 switch (error) { |
440 case NGX_HTTP_TO_HTTPS: | 451 case NGX_HTTP_TO_HTTPS: |
441 case NGX_HTTPS_CERT_ERROR: | 452 case NGX_HTTPS_CERT_ERROR: |
442 case NGX_HTTPS_NO_CERT: | 453 case NGX_HTTPS_NO_CERT: |
454 case NGX_HTTP_REQUEST_HEADER_TOO_LARGE: | |
443 r->err_status = NGX_HTTP_BAD_REQUEST; | 455 r->err_status = NGX_HTTP_BAD_REQUEST; |
444 break; | 456 break; |
445 } | 457 } |
446 | 458 |
447 } else { | 459 } else { |