HttpClient will close the InputStream automatically, when the connection is closed.
So we need to cache the InputStream in the HttpProducer before close the connection.
We can not leverage the on completion method of Exchange as the input stream maybe used after the exchange is completed. The JettyHttpFileCacheTest in the itest module shows the case that temp file will be deleted when the exchange is on completion before sending the response from the proxy.
We should let the user know that he has the responsibility to close the stream to release the temp file.