comparison src/http/ngx_http_request.c @ 612:ce857f6b74a7 NGINX_0_9_4

nginx 0.9.4 *) Feature: the "server_name" directive supports the $hostname variable. *) Feature: 494 code for "Request Header Too Large" error.
author Igor Sysoev <http://sysoev.ru>
date Fri, 21 Jan 2011 00:00:00 +0300
parents 3036c1836a24
children b9763778e212
comparison
equal deleted inserted replaced
611:f02ddde4a240 612:ce857f6b74a7
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);