You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by su...@apache.org on 2010/03/17 06:47:55 UTC

svn commit: r924168 - /synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/Axis2HttpRequest.java

Author: supun
Date: Wed Mar 17 05:47:55 2010
New Revision: 924168

URL: http://svn.apache.org/viewvc?rev=924168&view=rev
Log:
Fixing a bug with the Rest case, if the parameters are null, null was appended to the outgoing url

Modified:
    synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/Axis2HttpRequest.java

Modified: synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/Axis2HttpRequest.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/Axis2HttpRequest.java?rev=924168&r1=924167&r2=924168&view=diff
==============================================================================
--- synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/Axis2HttpRequest.java (original)
+++ synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/Axis2HttpRequest.java Wed Mar 17 05:47:55 2010
@@ -185,7 +185,8 @@ public class Axis2HttpRequest {
             URL reqURI = messageFormatter.getTargetAddress(
                     msgContext, format, new URL(epr.getAddress()));
             String path = (msgContext.isPropertyTrue(NhttpConstants.POST_TO_URI) ?
-                    reqURI.toString() : reqURI.getPath()) + "?" + reqURI.getQuery();
+                    reqURI.toString() : reqURI.getPath()) +
+                    (reqURI.getQuery() != null ? "?" + reqURI.getQuery() : "");
 
             httpRequest = new BasicHttpRequest(httpMethod, path,
                     msgContext.isPropertyTrue(NhttpConstants.FORCE_HTTP_1_0) ?