diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-03-12 17:54:29 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-03-12 17:54:29 +0300 |
commit | 5296be0b82784eb90abc86339e6c16841e9a9727 (patch) | |
tree | 442b315416f9c7ce00b9583ecf6daca07ae68290 /src/nxt_http_request.c | |
parent | 08b65721e25b1b94affc12078a623a11341525d1 (diff) | |
download | unit-5296be0b82784eb90abc86339e6c16841e9a9727.tar.gz unit-5296be0b82784eb90abc86339e6c16841e9a9727.tar.bz2 |
Using disk file to store large request body.
This closes #386 on GitHub.
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r-- | src/nxt_http_request.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; |