Author: jfrederic.clere(a)jboss.com
Date: 2013-08-23 11:37:32 -0400 (Fri, 23 Aug 2013)
New Revision: 2251
Modified:
branches/7.2.x/src/main/java/org/apache/catalina/connector/Connector.java
branches/7.2.x/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java
Log:
Fix (or work-around) for BZ995411)
Modified: branches/7.2.x/src/main/java/org/apache/catalina/connector/Connector.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/connector/Connector.java 2013-08-16
16:38:20 UTC (rev 2250)
+++ branches/7.2.x/src/main/java/org/apache/catalina/connector/Connector.java 2013-08-23
15:37:32 UTC (rev 2251)
@@ -216,7 +216,8 @@
/**
* Flag to use IP-based virtual hosting.
*/
- protected boolean useIPVHosts = false;
+ protected boolean useIPVHosts =
+
Boolean.valueOf(System.getProperty("org.apache.catalina.connector.USE_IP_PORT_FOR_ALIAS",
"false")).booleanValue();
/**
* The background thread.
Modified: branches/7.2.x/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java 2013-08-16
16:38:20 UTC (rev 2250)
+++
branches/7.2.x/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java 2013-08-23
15:37:32 UTC (rev 2251)
@@ -492,6 +492,10 @@
// well, they did ask for it
res.action(ActionCode.ACTION_REQ_LOCAL_NAME_ATTRIBUTE, null);
}
+ if (connector.getAllowedHosts() != null &&
connector.getAllowedHosts().size() == 1) {
+ serverName = serverName.newInstance();
+ serverName.setString(req.localName() + ":" +
req.getServerPort());
+ }
} else {
serverName = req.serverName();
}
Show replies by date