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

WebFlux multipart temporary file not deleted when the client disconnects early #28740

Closed
bgK opened this issue Jul 1, 2022 · 0 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@bgK
Copy link

bgK commented Jul 1, 2022

We have a Spring WebFlux 5.3.21 application doing multipart file upload. We noticed that sometimes the Part temporary files would not be deleted despite doing part cleanup with FilePart.delete() in our controller. Further investigation revealed that the temporary files are left behind when the clients disconnect before sending the whole file. In that case, the error occurs before the controller is called.

This happens surprisingly often as the clients are mobile devices with spotty cell network connectivity.

Attached is a reproducer for the issue.

early-disconnect-reproducer.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 1, 2022
@poutsma poutsma self-assigned this Jul 4, 2022
@poutsma poutsma added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 4, 2022
@poutsma poutsma added this to the 5.3.22 milestone Jul 4, 2022
@poutsma poutsma closed this as completed in aa8b06b Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants