You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2013/05/13 22:05:18 UTC

svn commit: r1482061 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java

Author: doogie
Date: Mon May 13 20:05:18 2013
New Revision: 1482061

URL: http://svn.apache.org/r1482061
Log:
FIX: In stripNamedParamsFromQueryString, prevent && from occuring in the
resultant buffer.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java?rev=1482061&r1=1482060&r2=1482061&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilHttp.java Mon May 13 20:05:18 2013
@@ -1080,10 +1080,10 @@ public class UtilHttp {
                     name = token.substring(0, equalsIndex);
                 }
                 if (!paramNames.contains(name)) {
-                    cleanQuery.append(token);
-                    if (queryTokens.hasMoreTokens()) {
+                    if (cleanQuery.length() > 0) {
                         cleanQuery.append("&");
                     }
+                    cleanQuery.append(token);
                 }
             }
             retStr = cleanQuery.toString();