Skip to content

Use of RequestPart with String leads to a file descriptor leak #27773

@samudra77

Description

@samudra77

StringHttpMessageConvertor is reading the InputStream but it's not closing it.
This keeps the file handle open and leaks file handles.
I am using @RequestPart in rest controller with string parameter.
the request is a multipart form data. Other Jackson converters are closing the streams.
The stream is pointing to a temporary file created by servlet api on tomcat.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions