Using disk file to store large request body.

This closes #386 on GitHub.
This commit is contained in:
Max Romanov
2020-03-12 17:54:29 +03:00
parent 08b65721e2
commit 5296be0b82
18 changed files with 455 additions and 36 deletions

View File

@@ -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;