axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r650195 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
Date Mon, 21 Apr 2008 16:30:25 GMT
Author: keithc
Date: Mon Apr 21 09:30:16 2008
New Revision: 650195

URL: http://svn.apache.org/viewvc?rev=650195&view=rev
Log:
Fixing Axis2-3759 in trunk


Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java?rev=650195&r1=650194&r2=650195&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
Mon Apr 21 09:30:16 2008
@@ -105,7 +105,7 @@
 
         String query = requestURL;
         int index;
-        if ((index = requestURL.indexOf("?")) > 0) {
+        if ((index = requestURL.indexOf("?")) > -1) {
             query = requestURL.substring(index + 1);
         }
 
@@ -254,9 +254,18 @@
                     if (templateStartIndex == -1) {
                         if (templateEndIndex == pathTemplate.length() - 1) {
 
+                            // We may have occations where we have templates of the form
foo/{name}.
+                            // In this case the next connstant will be ? and not the
+                            // queryParameterSeparator
                             indexOfNextConstant =
                                     requestURIBuffer
-                                            .indexOf(queryParameterSeparator, endIndexOfConstant);
+                                            .indexOf("?", endIndexOfConstant);
+                            if (indexOfNextConstant == -1) {
+                                indexOfNextConstant =
+                                        requestURIBuffer
+                                                .indexOf(queryParameterSeparator,
+                                                         endIndexOfConstant);
+                            }
                             if (indexOfNextConstant > 0) {
                                 addParameterToMap(parameterMap, parameterName,
                                                   requestURIBuffer.substring(endIndexOfConstant,



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message