Author: davsclaus
Date: Sat May 12 10:14:11 2012
New Revision: 1337497

URL: http://svn.apache.org/viewvc?rev=1337497&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.8.x/   (props changed)
    
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java
    
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java

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

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

Modified: 
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java?rev=1337497&r1=1337496&r2=1337497&view=diff
==============================================================================
--- 
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java
 (original)
+++ 
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/DefaultJettyHttpBinding.java
 Sat May 12 10:14:11 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.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java?rev=1337497&r1=1337496&r2=1337497&view=diff
==============================================================================
--- 
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java
 (original)
+++ 
camel/branches/camel-2.8.x/components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyContentExchange.java
 Sat May 12 10:14:11 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() {


Reply via email to