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

svn commit: r1379739 - /camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java

Author: bvahdat
Date: Sat Sep  1 10:29:16 2012
New Revision: 1379739

URL: http://svn.apache.org/viewvc?rev=1379739&view=rev
Log:
Revert the previous commit (that's live with the deprecated API usage of http client 4.2.1) as http client 4.1 should still be supported in OSGi (CAMEL-5511).

Modified:
    camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java

Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java?rev=1379739&r1=1379738&r2=1379739&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java (original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java Sat Sep  1 10:29:16 2012
@@ -52,7 +52,6 @@ import org.apache.http.client.methods.Ht
 import org.apache.http.client.methods.HttpRequestBase;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
 import org.apache.http.entity.FileEntity;
 import org.apache.http.entity.InputStreamEntity;
 import org.apache.http.entity.StringEntity;
@@ -425,7 +424,7 @@ public class HttpProducer extends Defaul
                         // file based (could potentially also be a FTP file etc)
                         File file = in.getBody(File.class);
                         if (file != null) {
-                            answer = new FileEntity(file, ContentType.parse(contentType));
+                            answer = new FileEntity(file, contentType);
                         }
                     } else if (data instanceof String) {
                         // be a bit careful with String as any type can most likely be converted to String