Description
CachedOutputStream's resetOut() has a section of code where it is possible to open a FileInputStream without closing it. This happens if the stream is not in memory, and copyOldContent is false.
I noticed this when I added a "LoggingOutInterceptor". When large messages were logged, temp files would accumulate in the temp directory. Applying the attached patch solved the problem.