Author: jacopoc
Date: Sat Feb 28 11:18:30 2015
New Revision: 1662919
URL:
http://svn.apache.org/r1662919Log:
With this change the "secure" attribute of <@ofbizURL/> will be honoured (as it was until 13.07) even when the request-map doesn't have a "security" element, i.e.:
<@ofbizUrl secure="true">SomeRequest</@ofbizUrl>
will actually use the https protocol. Thanks to Deepak Dixit for reporting discussing the issue and fix with me.
Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/OfbizUrlBuilder.java
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/OfbizUrlBuilder.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/OfbizUrlBuilder.java?rev=1662919&r1=1662918&r2=1662919&view=diff==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/OfbizUrlBuilder.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/OfbizUrlBuilder.java Sat Feb 28 11:18:30 2015
@@ -133,7 +133,7 @@ public final class OfbizUrlBuilder {
* @param buffer
* @param url
* @param useSSL Default value to use - will be replaced by request-map setting
- * if one is found.
+ * if one is found with security=true set.
* @return <code>true</code> if the URL uses https
* @throws WebAppConfigurationException
* @throws IOException
@@ -150,7 +150,7 @@ public final class OfbizUrlBuilder {
if (config != null) {
requestMap = config.getRequestMapMap().get(requestMapUri);
}
- if (requestMap != null) {
+ if (!makeSecure && requestMap != null) { // if the request has security="true" then use it
makeSecure = requestMap.securityHttps;
}
makeSecure = webSiteProps.getEnableHttps() & makeSecure;