Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5367

DefaultJettyHttpBinding should not convert binary HTTP body

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.8.6, 2.9.3, 2.10.0
    • camel-jetty
    • None
    • Moderate

    Description

      In class DefaultJettyHttpBinding, method "extractResponseBody", any non-Java HTTP body is considered as string.
      This corrupts binary files such as images when camel-jetty is used as a proxy http://camel.apache.org/how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html
      Only bodies with MIME types of non-binary data should be converted to strings.
      Method "doWriteDirectResponse" of class "DefaultHttpBinding" (in camel-http) converts it again, which corrupts it even more.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              metatech metatech
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: