Details
-
Bug
-
Resolution: Done
-
Major
-
2.3.4.Final
-
None
Description
The InputStreamProvider class successfully copies data from the InputStream to the response OutputStream, but it doesn't close the InputStream. Unless I am missing something (always possible!) there is no way for the InputStream to be closed.
My use case is returning artifact content in an S-RAMP repository Atom API binding. In the Atom API binding, most endpoints return Atom formatted data. There is a /media endpoint for S-RAMP artifacts that will return the original raw binary content, which gets returned from the repository as an InputStream. My jaxrs method looks like this:
@GET
@Path("
/media")
@Produces(MediaType.TEXT_XML)
public InputStream getContent(@PathParam("uuid") String uuid)
My expectation is that resteasy would close my InputStream when it was done streaming the content.