You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2021/12/01 14:06:50 UTC
[Bug 65710] multipartfile stream close doesn't release the handle
https://bz.apache.org/bugzilla/show_bug.cgi?id=65710
--- Comment #5 from promenader@163.com ---
test code:
@RestController
@RequestMapping(value = "/demo")
public class DemoController {
@RequestMapping(value = "/upload",method = RequestMethod.POST)
public String upload(@RequestParam("file") MultipartFile file){
try{
InputStream inputStream = file.getInputStream();
}catch (IOException e){
e.printStackTrace();
}
return "ok";
}
}
curl request:
#!/bin/bash
while ((1))
do
curl -X POST \
http://192.168.157.128:8080/demo/upload \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data;
boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'postman-token: 2928b4db-034f-9c57-209e-d3f31474596b' \
-F 'file=@test.pdf'
done
in Tomcat 9.0.52, the linux handle will autorelease
ll /proc/*/fd | grep delete | wc -l
it will not increase to the limit .
in Tomcat 9.0.54, will not.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org