From 5296be0b82784eb90abc86339e6c16841e9a9727 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 12 Mar 2020 17:54:29 +0300 Subject: Using disk file to store large request body. This closes #386 on GitHub. --- src/nxt_http_request.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nxt_http_request.c') diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 51553f0c..72aaa290 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -569,6 +569,14 @@ nxt_http_request_close_handler(nxt_task_t *task, void *obj, void *data) r->proto.any = NULL; + if (r->body != NULL && nxt_buf_is_file(r->body) + && r->body->file->fd != -1) + { + nxt_fd_close(r->body->file->fd); + + r->body->file->fd = -1; + } + if (nxt_fast_path(proto.any != NULL)) { protocol = r->protocol; -- cgit