[Yanel-commits] rev 35966 -
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map
michi at wyona.com
michi at wyona.com
Tue Apr 22 15:57:05 CEST 2008
Author: michi
Date: 2008-04-22 15:57:04 +0200 (Tue, 22 Apr 2008)
New Revision: 35966
Modified:
public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java
Log:
check if reverse proxy prefix has been set without value and return null if so
Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java 2008-04-22 13:53:44 UTC (rev 35965)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/RealmManager.java 2008-04-22 13:57:04 UTC (rev 35966)
@@ -236,7 +236,10 @@
if (proxy != null) {
int proxyPort = new Integer(proxy.getChild("port").getValue("-1")).intValue();
int proxySSLPort = new Integer(proxy.getChild("ssl-port").getValue("-1")).intValue();
- realm.setProxy(proxy.getChild("host-name").getValue(), proxyPort, proxySSLPort, proxy.getChild("prefix").getValue());
+ String prefixValue = proxy.getChild("prefix").getValue("");
+ if (prefixValue.length() == 0) prefixValue = null;
+ log.debug("Prefix value: " + prefixValue);
+ realm.setProxy(proxy.getChild("host-name").getValue(), proxyPort, proxySSLPort, prefixValue);
}
log.info("Realm: " + realm);
@@ -252,8 +255,7 @@
}
}
} catch (Exception e) {
- String errorMsg = "Error setting up realm [" + realmId + "]: " + realmConfigFile
- + ": " + e;
+ String errorMsg = "Error setting up realm [" + realmId + "]: " + realmConfigFile + ": " + e;
log.error(errorMsg, e);
// NOTE: Do not throw an exception, because otherwise all other realms are not being loaded either
// TODO/TBD: Maybe one should enhance Realm by a method such as setStatus() and getStatus() in order to check if a realm has been registered successfully or not!
More information about the Yanel-commits
mailing list