aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/at/gv/egovernment/moa/id/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'id.server/src/at/gv/egovernment/moa/id/proxy')
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java b/id.server/src/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java
index 20da9ff52..3e8484f55 100644
--- a/id.server/src/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java
+++ b/id.server/src/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java
@@ -91,7 +91,7 @@ public class ProxyServlet extends HttpServlet {
/** Name of the Attribute for user binding */
private static final String ATT_OA_USER_BINDING = "UserBinding";
/** For extended internal debug messages */
- private static final boolean INTERNAL_DEBUG = false;
+ private static final boolean INTERNAL_DEBUG = true;
/** Message to be given if browser login failed */
private static final String RET_401_MSG = "<html><head><title>Ein Fehler ist aufgetreten</title></head><body><h1>Fehler bei der Anmeldung</h1><p>Bei der Anmeldung ist ein Fehler aufgetreten.</p><p>Fehler bei der Anmeldung. <br>Pr&uuml;fen Sie bitte ihre Berechtigung.<br><b>Abbruch durch den Benutzer.</b><br></p></body></html>";
@@ -195,7 +195,7 @@ public class ProxyServlet extends HttpServlet {
if (oaConf.getAuthType().equals(OAConfiguration.PARAM_AUTH))
loginParameters = lpr.getAuthenticationParameters(oaConf, authData, clientIPAddress, businessService);
else
- loginHeaders = lpr.getAuthenticationHeaders(oaConf, authData, clientIPAddress, businessService);
+ loginHeaders = lpr.getAuthenticationHeaders(oaConf, authData, clientIPAddress, businessService, publicURLPrefix);
} catch (LoginParameterResolverException ex) {
throw new ProxyException("proxy.13", new Object[] { publicURLPrefix });
} catch (NotAllowedException e) {
@@ -322,6 +322,8 @@ private int tunnelRequest(HttpServletRequest req, HttpServletResponse resp, Map
String browserUserID = "";
String browserPassword = "";
+ //URL url = new URL(realURLPrefix);
+ //String realURLHost = url.getHost();
if (INTERNAL_DEBUG && !binding.equals("")) Logger.debug("Binding: " + binding);
// collect headers from request
@@ -346,7 +348,14 @@ private int tunnelRequest(HttpServletRequest req, HttpServletResponse resp, Map
}
else
{
- headers.put(headerKey, headerKeyValue);
+ /* Headers MUST NOT be repaced according to our Spec.
+ if (headerKey.equalsIgnoreCase("Host")) {
+ headerKeyValue = realURLHost;
+ //headerKeyValue= realURLPrefix.substring(hoststartpos);
+ if (INTERNAL_DEBUG) Logger.debug("replaced:" + headerKey + "=" + headerKeyValue);
+ }
+ */
+ headers.put(headerKey, headerKeyValue);
}
}