cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1236624 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
Date Fri, 27 Jan 2012 10:25:13 GMT
Author: sergeyb
Date: Fri Jan 27 10:25:12 2012
New Revision: 1236624

URL: http://svn.apache.org/viewvc?rev=1236624&view=rev
Log:
[CXF-4067] JAX-RS proxies ignore Consumes if the body type is String

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java?rev=1236624&r1=1236623&r2=1236624&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
Fri Jan 27 10:25:12 2012
@@ -288,9 +288,7 @@ public class ClientProxyImpl extends Abs
             if (formParams || bodyClass != null && MultivaluedMap.class.isAssignableFrom(bodyClass))
{
                 headers.putSingle(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED);
             } else {
-                String cType = 
-                    bodyClass != null && InjectionUtils.isPrimitive(bodyClass) 
-                        ? MediaType.TEXT_PLAIN : ori.getConsumeTypes().isEmpty() 
+                String cType = ori.getConsumeTypes().isEmpty() 
                     || ori.getConsumeTypes().get(0).equals(MediaType.WILDCARD_TYPE) 
                     ? MediaType.APPLICATION_XML : ori.getConsumeTypes().get(0).toString();
  
                 headers.putSingle(HttpHeaders.CONTENT_TYPE, cType);



Mime
View raw message