Camel
  1. Camel
  2. CAMEL-4098

camel-http - Apparently it forces the streamcache

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: camel-http
    • Labels:
      None

      Description

      It seems there is logic in camel-http that stream cache, regardless what.

      We should avoid this as ppl should be able to use Camel with the streams directly.
      And there seems to be an issue that the camel-http doesn't clear tmp files. Seems like the on completion isnt added to the Exchange which ensures to delete the tmp files.

      See nabble
      http://camel.465427.n5.nabble.com/http-not-cleaning-up-tmp-files-when-exchange-is-stopped-tp4269124p4269124.html

      This is most likely also an issue with camel-http4

        Issue Links

          Activity

          Hide
          Willem Jiang added a comment - - edited

          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.

          Show
          Willem Jiang added a comment - - edited 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.
          Hide
          Claus Ibsen added a comment -

          Lets leave current behavior as is, as its been like this from the start.

          Show
          Claus Ibsen added a comment - Lets leave current behavior as is, as its been like this from the start.

            People

            • Assignee:
              Willem Jiang
              Reporter:
              Claus Ibsen
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development