Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immediately unlink temporary files #2613

Merged
merged 1 commit into from Apr 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/puma/client.rb
Expand Up @@ -295,6 +295,7 @@ def setup_body

if remain > MAX_BODY
@body = Tempfile.new(Const::PUMA_TMP_BASE)
@body.unlink
@body.binmode
@tempfile = @body
else
Expand Down Expand Up @@ -386,6 +387,7 @@ def setup_chunked_body(body)
@prev_chunk = ""

@body = Tempfile.new(Const::PUMA_TMP_BASE)
@body.unlink
@body.binmode
@tempfile = @body
@chunked_content_length = 0
Expand Down