summaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2011-01-21 11:06:03 +0000
committerJonathan Kolb <jon@b0g.us>2011-01-21 11:06:03 +0000
commite52b136dd7a6ad34b361b8b48eef7cbaa48282ca (patch)
tree271a2fac7e4bce8b8c8d220ba4815ae65cf2a938 /src/http/ngx_http_request.c
parent487d8fc7628cac7beb9240e6f1d9ebf53a1f30d7 (diff)
downloadnginx-0.9.4.tar.gz
Changes with nginx 0.9.4 21 Jan 2011v0.9.4
*) Feature: the "server_name" directive supports the $hostname variable. *) Feature: 494 code for "Request Header Too Large" error.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 55e220a31..bd51e061f 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -978,10 +978,13 @@ ngx_http_process_request_headers(ngx_event_t *rev)
if (rv == NGX_DECLINED) {
p = r->header_name_start;
+ r->lingering_close = 1;
+
if (p == NULL) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"client sent too large request");
- ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
+ ngx_http_finalize_request(r,
+ NGX_HTTP_REQUEST_HEADER_TOO_LARGE);
return;
}
@@ -995,7 +998,9 @@ ngx_http_process_request_headers(ngx_event_t *rev)
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"client sent too long header line: \"%*s\"",
len, r->header_name_start);
- ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
+
+ ngx_http_finalize_request(r,
+ NGX_HTTP_REQUEST_HEADER_TOO_LARGE);
return;
}
}