SEC-187: Tidy up URL composition logic basedon default HTTP(S) ports.

This commit is contained in:
Ben Alex 2006-04-26 04:19:35 +00:00
parent 307ac99ec5
commit f6b7429947
1 changed files with 4 additions and 6 deletions

View File

@ -98,11 +98,9 @@ public class AuthenticationProcessingFilterEntryPoint
boolean includePort = true;
if ("http".equals(scheme.toLowerCase()) && (serverPort == 80)) {
if (inHttp && (serverPort == 80)) {
includePort = false;
}
if ("https".equals(scheme.toLowerCase()) && (serverPort == 443)) {
} else if (inHttps && (serverPort == 443)) {
includePort = false;
}
@ -111,8 +109,8 @@ public class AuthenticationProcessingFilterEntryPoint
+ loginFormUrl;
if (forceHttps && inHttp) {
Integer httpPort = new Integer(portResolver.getServerPort(request));
Integer httpsPort = (Integer) portMapper.lookupHttpsPort(httpPort);
Integer httpsPort = (Integer) portMapper.lookupHttpsPort(new Integer(
serverPort));
if (httpsPort != null) {
if (httpsPort.intValue() == 443) {