ResourceHttpRequestHandler explicitly closes a Resource's InputStream
Issue: SPR-11644
This commit is contained in:
parent
54f66e451d
commit
3a96f16654
|
|
@ -251,7 +251,17 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
|
|||
* @throws IOException in case of errors while writing the content
|
||||
*/
|
||||
protected void writeContent(HttpServletResponse response, Resource resource) throws IOException {
|
||||
StreamUtils.copy(resource.getInputStream(), response.getOutputStream());
|
||||
InputStream in = resource.getInputStream();
|
||||
try {
|
||||
StreamUtils.copy(in, response.getOutputStream());
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
in.close();
|
||||
}
|
||||
catch (IOException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue