Mercurial > hg > nginx
comparison src/http/ngx_http_request.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 | e6e453203bae |
children | e3cb8e27e413 |
comparison
equal
deleted
inserted
replaced
3847:1df5620b9cd6 | 3848:de59ad6bf557 |
---|---|
976 } | 976 } |
977 | 977 |
978 if (rv == NGX_DECLINED) { | 978 if (rv == NGX_DECLINED) { |
979 p = r->header_name_start; | 979 p = r->header_name_start; |
980 | 980 |
981 r->lingering_close = 1; | |
982 | |
981 if (p == NULL) { | 983 if (p == NULL) { |
982 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 984 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
983 "client sent too large request"); | 985 "client sent too large request"); |
984 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | 986 ngx_http_finalize_request(r, |
987 NGX_HTTP_REQUEST_HEADER_TOO_LARGE); | |
985 return; | 988 return; |
986 } | 989 } |
987 | 990 |
988 len = r->header_in->end - p; | 991 len = r->header_in->end - p; |
989 | 992 |
993 } | 996 } |
994 | 997 |
995 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 998 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
996 "client sent too long header line: \"%*s\"", | 999 "client sent too long header line: \"%*s\"", |
997 len, r->header_name_start); | 1000 len, r->header_name_start); |
998 ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); | 1001 |
1002 ngx_http_finalize_request(r, | |
1003 NGX_HTTP_REQUEST_HEADER_TOO_LARGE); | |
999 return; | 1004 return; |
1000 } | 1005 } |
1001 } | 1006 } |
1002 | 1007 |
1003 n = ngx_http_read_request_header(r); | 1008 n = ngx_http_read_request_header(r); |