Author: sascharodekamp
Date: Tue Mar 6 12:22:58 2012 New Revision: 1297440 URL: http://svn.apache.org/viewvc?rev=1297440&view=rev Log: Revert r1297031 because the encoding makes a problem with redirecting from HTTP to HTTPS Modified: ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Modified: ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=1297440&r1=1297439&r2=1297440&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/branches/release11.04/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Tue Mar 6 12:22:58 2012 @@ -24,8 +24,6 @@ import java.io.IOException; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.net.URL; -import java.net.URLEncoder; -import java.nio.charset.Charset; import java.security.cert.X509Certificate; import java.util.Enumeration; import java.util.List; @@ -914,7 +912,7 @@ public class RequestHandler { * @return */ public String makeQueryString(HttpServletRequest request, ConfigXMLReader.RequestResponse requestResponse) { - if (requestResponse == null || + if (requestResponse == null || (requestResponse.redirectParameterMap.size() == 0 && requestResponse.redirectParameterValueMap.size() == 0)) { Map<String, Object> urlParams = UtilHttp.getUrlOnlyParameterMap(request); String queryString = UtilHttp.urlEncodeArgs(urlParams, false); @@ -1099,12 +1097,7 @@ public class RequestHandler { newURL.insert(questionIndex, sessionId); } } - try { - encodedUrl = URLEncoder.encode(newURL.toString(), Charset.forName("UTF-8").displayName()); - } catch (UnsupportedEncodingException e) { - Debug.logError(e, module); - encodedUrl = newURL.toString(); - } + encodedUrl = newURL.toString(); } } else { encodedUrl = newURL.toString(); Modified: ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/WidgetWorker.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1297440&r1=1297439&r2=1297440&view=diff ============================================================================== --- ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original) +++ ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Tue Mar 6 12:22:58 2012 @@ -20,10 +20,7 @@ package org.ofbiz.widget; import java.io.IOException; import java.io.StringWriter; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; -import java.net.URLEncoder; -import java.nio.charset.Charset; import java.text.DateFormat; import java.util.Map; import java.util.TimeZone; @@ -340,12 +337,7 @@ public class WidgetWorker { public String getValue(Map<String, Object> context) { if (this.value != null) { - try { - return URLEncoder.encode(this.value.expandString(context), Charset.forName("UTF-8").displayName()); - } catch (UnsupportedEncodingException e) { - Debug.logError(e, module); - return this.value.expandString(context); - } + return this.value.expandString(context); } Object retVal = null; @@ -376,11 +368,7 @@ public class WidgetWorker { DateFormat df = UtilDateTime.toDateTimeFormat("EEE MMM dd hh:mm:ss z yyyy", timeZone, null); returnValue = df.format((java.util.Date) retVal); } else { - try { - returnValue = URLEncoder.encode(retVal.toString(), Charset.forName("UTF-8").displayName()); - } catch (UnsupportedEncodingException e) { - Debug.logError(e, module); - } + returnValue = retVal.toString(); } return returnValue; } else { |
Free forum by Nabble | Edit this page |