svn commit: r949946 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r949946 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

jleroux@apache.org
Author: jleroux
Date: Tue Jun  1 07:17:34 2010
New Revision: 949946

URL: http://svn.apache.org/viewvc?rev=949946&view=rev
Log:
A patch from Sascha Rodekamp "Request Handler, makeQuesryString returns a '?' when no parameter is set" (https://issues.apache.org/jira/browse/OFBIZ-3792) - OFBIZ-3792

Just a little patch for good looking URLs. The Method returns a '?' when the query String is empty. I find there shouldn't be a '?' when no key/value pair is past to the URL.

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=949946&r1=949945&r2=949946&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Tue Jun  1 07:17:34 2010
@@ -907,6 +907,9 @@ public class RequestHandler {
         if (requestResponse == null || requestResponse.redirectParameterMap.size() == 0) {
             Map<String, Object> urlParams = UtilHttp.getUrlOnlyParameterMap(request);
             String queryString = UtilHttp.urlEncodeArgs(urlParams, false);
+            if(UtilValidate.isEmpty(queryString)) {
+                return queryString;
+            }
             return "?" + queryString;
         } else {
             StringBuilder queryString = new StringBuilder();