Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static WebSiteProperties from(HttpServletRequest request) throws GenericE
Assert.notNull("request", request);
WebSiteProperties webSiteProps = (WebSiteProperties) request.getAttribute("_WEBSITE_PROPS_");
if (webSiteProps == null) {
Boolean addPortoffset = true;
Boolean addPortoffset = false;
Delegator delegator = (Delegator) request.getAttribute("delegator");
if (delegator != null) {
String webSiteId = WebSiteWorker.getWebSiteId(request);
Expand All @@ -94,6 +94,7 @@ public static WebSiteProperties from(HttpServletRequest request) throws GenericE
}
if (webSiteProps == null) {
webSiteProps = new WebSiteProperties(delegator);
addPortoffset = true;
}
if (webSiteProps.getHttpPort().isEmpty() && !request.isSecure()) {
webSiteProps = webSiteProps.updateHttpPort(String.valueOf(request.getServerPort()));
Expand All @@ -103,7 +104,6 @@ public static WebSiteProperties from(HttpServletRequest request) throws GenericE
}
if (webSiteProps.getHttpsPort().isEmpty() && request.isSecure()) {
webSiteProps = webSiteProps.updateHttpsPort(String.valueOf(request.getServerPort()));
addPortoffset = false; // We take the port from the request, don't add the portOffset
}
if (webSiteProps.getHttpsHost().isEmpty()) {
webSiteProps = webSiteProps.updateHttpsHost(request.getServerName());
Expand Down