The current org.apache.catalina.connector.http.HttpConnector doesn't
bind to a single ip if the hostname of the machine doesn't have a A
record for the IP.
This breaks most Virtualserver enviroments that want to run different
server (for example apache and tomcat) on the same machine.
The patch should solve this problem.
--
Thomas Butter <[EMAIL PROTECTED]> ICQ: 891617
"Unix IS user friendly, it is just selective about who his friends are."
--- HttpConnector.java.orig Wed Jan 10 23:17:51 2001
+++ HttpConnector.java Wed Jan 10 23:20:16 2001
@@ -734,17 +734,12 @@
}
// Open a server socket on the specified address
- InetAddress[] addresses =
- InetAddress.getAllByName(InetAddress.getLocalHost().getHostName());
- int i;
- for (i = 0; i < addresses.length; i++) {
- if (addresses[i].getHostAddress().equals(address))
- break;
- }
- if (i < addresses.length) {
+ try
+ {
+ InetAddress is=InetAddress.getByName(address);
log(sm.getString("httpConnector.anAddress", address));
return (factory.createSocket(port, acceptCount, addresses[i]));
- } else {
+ } catch(Exception e) {
log(sm.getString("httpConnector.noAddress", address));
return (factory.createSocket(port, acceptCount));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]