cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1454352 - /cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
Date Fri, 08 Mar 2013 12:46:47 GMT
Author: sergeyb
Date: Fri Mar  8 12:46:47 2013
New Revision: 1454352

URL: http://svn.apache.org/r1454352
Log:
[CXF-4873] Updating WebClient to escape the query question mark to bypass MBean ObjectName
restrictions

Modified:
    cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java

Modified: cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java?rev=1454352&r1=1454351&r2=1454352&view=diff
==============================================================================
--- cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java (original)
+++ cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/WebClient.java Fri Mar
 8 12:46:47 2013
@@ -1023,7 +1023,12 @@ public class WebClient extends AbstractC
         if (body != null) {
             m.getInterceptorChain().add(new BodyWriter());
         }
-        setPlainOperationNameProperty(m, httpMethod + ":" + uri.toString());
+        String uriString = uri.toString();
+        int questionMarkIndex = uriString.lastIndexOf("?");
+        if (questionMarkIndex != -1) {
+            uriString = uriString.replace("?", "\\?");
+        }
+        setPlainOperationNameProperty(m, httpMethod + ":" + uriString);
         return m;
     }
     



Mime
View raw message