Author: jfrederic.clere(a)jboss.com
Date: 2012-08-10 12:49:50 -0400 (Fri, 10 Aug 2012)
New Revision: 2063
Modified:
branches/7.0.x/java/org/apache/catalina/connector/Connector.java
Log:
Improve the patch a bit more...
Modified: branches/7.0.x/java/org/apache/catalina/connector/Connector.java
===================================================================
--- branches/7.0.x/java/org/apache/catalina/connector/Connector.java 2012-08-10 15:35:58
UTC (rev 2062)
+++ branches/7.0.x/java/org/apache/catalina/connector/Connector.java 2012-08-10 16:49:50
UTC (rev 2063)
@@ -270,7 +270,7 @@
* Allowed virtual hosts.
*/
protected Set<String> allowedHosts = null;
- protected Set<String> allowedHostsIgnoreCase = new HashSet();
+ protected Set<String> allowedHostsIgnoreCase = null;
protected static HashMap<String, String> replacements = new HashMap<String,
String>();
static {
@@ -393,7 +393,11 @@
public void setAllowedHosts(Set<String> allowedHosts) {
this.allowedHosts = allowedHosts;
- addAllowedHostsToLowerCaseSet();
+ if (allowedHosts != null) {
+ this.allowedHostsIgnoreCase = new HashSet();
+ addAllowedHostsToLowerCaseSet();
+ } else
+ this.allowedHostsIgnoreCase = null;
}
private void addAllowedHostsToLowerCaseSet() {
Show replies by date