From 2eba00260d487e266e5be07ff96ba632467db8f6 Mon Sep 17 00:00:00 2001 From: "peter.danner" Date: Fri, 3 Feb 2006 15:40:22 +0000 Subject: changements for database support git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@620 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'id.server/src/at') 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 = "Ein Fehler ist aufgetreten

Fehler bei der Anmeldung

Bei der Anmeldung ist ein Fehler aufgetreten.

Fehler bei der Anmeldung.
Prüfen Sie bitte ihre Berechtigung.
Abbruch durch den Benutzer.

"; @@ -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); } } -- cgit v1.2.3