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

DefaultJettyHttpBinding should not convert binary HTTP body

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.6, 2.9.3, 2.10.0
    • Component/s: camel-jetty
    • Labels:
      None
    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: