You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/30 19:20:10 UTC

DO NOT REPLY [Bug 18500] New: - Host aliases to match by regular expression (trivial)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18500>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18500

Host aliases to match by regular expression (trivial)

           Summary: Host aliases to match by regular expression (trivial)
           Product: Tomcat 4
           Version: 4.1.24
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: arh14@cornell.edu


I would like hosts to match aliases by regular expression instead of exact 
match.  This can be done trivially with the following patch under 1.4 (or under 
previous VMs by using Jakarta Regexp):

--- StandardEngineMapper.java.bak       2003-03-19 10:18:38.000000000 -0500
+++ StandardEngineMapper.java   2003-03-30 12:13:13.000000000 -0500
@@ -205,7 +205,7 @@
             for (int i = 0; i < children.length; i++) {
                 String aliases[] = ((Host) children[i]).findAliases();
                 for (int j = 0; j < aliases.length; j++) {
-                    if (server.equals(aliases[j])) {
+                    if (server.matches(aliases[j])) {
                         host = (Host) children[i];
                         break;
                     }

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org