summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-03-12 17:54:19 +0300
committerMax Romanov <max.romanov@nginx.com>2020-03-12 17:54:19 +0300
commit0b5aabfc3f6dafa00d4cd4da595bceeefd1a1d27 (patch)
treea2e15a24880b57c7991e2b0a7ee47a2fd888801f /src/nxt_h1proto.c
parentf3e6726098220701dc2193c440852d04508cf972 (diff)
downloadunit-0b5aabfc3f6dafa00d4cd4da595bceeefd1a1d27.tar.gz
unit-0b5aabfc3f6dafa00d4cd4da595bceeefd1a1d27.tar.bz2
Checking Content-Length value right after header parse.
The check was moved from the request body read stage.
Diffstat (limited to '')
-rw-r--r--src/nxt_h1proto.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 1a6c537e..c326ef30 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -847,11 +847,6 @@ nxt_h1p_request_body_read(nxt_task_t *task, nxt_http_request_t *r)
goto ready;
}
- if (r->content_length_n > (nxt_off_t) r->conf->socket_conf->max_body_size) {
- status = NXT_HTTP_PAYLOAD_TOO_LARGE;
- goto error;
- }
-
body_length = (size_t) r->content_length_n;
b = r->body;