Fix for multi-hostname machines
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 29 Feb 2008 08:04:19 +0000 (08:04 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 29 Feb 2008 08:04:19 +0000 (08:04 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2672 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/authn/provider/PreviousSessionLoginHandler.java
src/edu/internet2/middleware/shibboleth/idp/authn/provider/RemoteUserLoginHandler.java
src/edu/internet2/middleware/shibboleth/idp/authn/provider/UsernamePasswordLoginHandler.java
src/edu/internet2/middleware/shibboleth/idp/authn/provider/UsernamePasswordLoginServlet.java

index d0b695c..0c9b46c 100644 (file)
@@ -120,8 +120,8 @@ public class PreviousSessionLoginHandler extends AbstractLoginHandler {
 
                 URLBuilder urlBuilder = new URLBuilder();
                 urlBuilder.setScheme(httpRequest.getScheme());
-                urlBuilder.setHost(httpRequest.getLocalName());
-                urlBuilder.setPort(httpRequest.getLocalPort());
+                urlBuilder.setHost(httpRequest.getServerName());
+                urlBuilder.setPort(httpRequest.getServerPort());
                 urlBuilder.setPath(pathBuilder.toString());
 
                 log.debug("Redirecting to {}", urlBuilder.buildURL());
index ff0bfff..c8f75a7 100644 (file)
@@ -68,8 +68,8 @@ public class RemoteUserLoginHandler extends AbstractLoginHandler {
 
             URLBuilder urlBuilder = new URLBuilder();
             urlBuilder.setScheme(httpRequest.getScheme());
-            urlBuilder.setHost(httpRequest.getLocalName());
-            urlBuilder.setPort(httpRequest.getLocalPort());
+            urlBuilder.setHost(httpRequest.getServerName());
+            urlBuilder.setPort(httpRequest.getServerPort());
             urlBuilder.setPath(pathBuilder.toString());
 
             log.debug("Redirecting to {}", urlBuilder.buildURL());
index a9a9027..8ff46ad 100644 (file)
@@ -67,8 +67,8 @@ public class UsernamePasswordLoginHandler extends AbstractLoginHandler {
 
             URLBuilder urlBuilder = new URLBuilder();
             urlBuilder.setScheme(httpRequest.getScheme());
-            urlBuilder.setHost(httpRequest.getLocalName());
-            urlBuilder.setPort(httpRequest.getLocalPort());
+            urlBuilder.setHost(httpRequest.getServerName());
+            urlBuilder.setPort(httpRequest.getServerPort());
             urlBuilder.setPath(pathBuilder.toString());
 
             log.debug("Redirecting to {}", urlBuilder.buildURL());
index ccc04fe..995b204 100644 (file)
@@ -123,8 +123,8 @@ public class UsernamePasswordLoginServlet extends HttpServlet {
 
             URLBuilder urlBuilder = new URLBuilder();
             urlBuilder.setScheme(request.getScheme());
-            urlBuilder.setHost(request.getLocalName());
-            urlBuilder.setPort(request.getLocalPort());
+            urlBuilder.setHost(request.getServerName());
+            urlBuilder.setPort(request.getServerPort());
             urlBuilder.setPath(pathBuilder.toString());
 
             if (queryParams == null) {