You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2012/05/12 12:12:58 UTC

svn commit: r1337496 - in /camel/branches/camel-2.9.x: ./ components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java

Author: davsclaus
Date: Sat May 12 10:12:57 2012
New Revision: 1337496

URL: http://svn.apache.org/viewvc?rev=1337496&view=rev
Log:
CAMEL-5274: Fixed jetty http client issue with streams may be corrupt. Code aligned like http/http4 producers.

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java
    camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1337495

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java?rev=1337496&r1=1337495&r2=1337496&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java (original)
+++ camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java Sat May 12 10:12:57 2012
@@ -166,7 +166,7 @@ public class DefaultJettyHttpBinding imp
                 throw new RuntimeCamelException("Cannot deserialize body to Java object", e);
             }
         } else {
-            // just grab the content as string
+            // just grab the raw content body
             return httpExchange.getBody();
         }
     }

Modified: camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java?rev=1337496&r1=1337495&r2=1337496&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java (original)
+++ camel/branches/camel-2.9.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java Sat May 12 10:12:57 2012
@@ -151,8 +151,9 @@ public class JettyContentExchange extend
         return headers;
     }
 
-    public String getBody() throws UnsupportedEncodingException {
-        return super.getResponseContent();
+    public byte[] getBody() {
+        // must return the content as raw bytes
+        return super.getResponseContentBytes();
     }
 
     public String getUrl() {