pero 2005/06/04 05:33:38
Modified: catalina/src/share/org/apache/catalina/connector
Connector.java
webapps/docs changelog.xml
webapps/docs/config ajp.xml http.xml
Log:
Support Host Alias matching with Connector attribute allowedAliasMatches
Submitted by George Sexton
Revision Changes Path
1.22 +8 -2
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java
Index: Connector.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Connector.java 22 May 2005 17:18:28 -0000 1.21
+++ Connector.java 4 Jun 2005 12:33:38 -0000 1.22
@@ -42,6 +42,8 @@
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.http.mapper.Mapper;
+import com.sun.org.apache.bcel.internal.generic.ALOAD;
+
/**
* Implementation of a Coyote connector for Tomcat 5.x.
@@ -1104,6 +1106,10 @@
}
if( this.domain != null ) {
+ Object allowedAliasMatches = getProperty("allowedAliasMatches") ;
+ if(allowedAliasMatches != null && allowedAliasMatches instanceof
String )
+ IntrospectionUtils.setProperty(mapper, "allowedAliasMatches",
+ (String)allowedAliasMatches);
mapperListener.setDomain( domain );
//mapperListener.setEngine( service.getContainer().getName() );
mapperListener.init();
@@ -1113,7 +1119,7 @@
log.debug(sm.getString(
"coyoteConnector.MapperRegistration",
mapperOname));
Registry.getRegistry(null, null).registerComponent
- (mapper, createObjectName(this.domain,"Mapper"),
"Mapper");
+ (mapper, mapperOname, "Mapper");
} catch (Exception ex) {
log.error(sm.getString
("coyoteConnector.protocolRegistrationFailed"), ex);
1.312 +5 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml
Index: changelog.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -r1.311 -r1.312
--- changelog.xml 16 May 2005 18:34:51 -0000 1.311
+++ changelog.xml 4 Jun 2005 12:33:38 -0000 1.312
@@ -72,6 +72,11 @@
<subsection name="Catalina">
<changelog>
+ <add>
+ Support Host Alias matching with Connector attribute
allowedAliasMatches="max alias".
+ So we can easier integrate subdomain as host alias
<Alias>*.mydomain.net"</Alias>.
+ Submitted by George Sexton (pero)
+ </add>
<fix>
<bug>20380</bug>: Access log timestamps now take account of Daylight
Saving
Time (DST). (markt)
1.16 +7 -0 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml
Index: ajp.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ajp.xml 22 May 2005 17:18:28 -0000 1.15
+++ ajp.xml 4 Jun 2005 12:33:38 -0000 1.16
@@ -52,6 +52,13 @@
<attributes>
+ <attribute name="allowedAliasMatches" required="false">
+ <p>Set this attribute to max subdomain alias matches <code>16</code>.
+ Is this attribute >0 the host alias element support Alias Matches
+ (<Alias>*.mydomain.net"</Alias> ).
+ The default value is <code>0</code> no host alias matches support.</p>
+ </attribute>
+
<attribute name="allowTrace" required="false">
<p>A boolean value which can be used to enable or disable the TRACE
HTTP method. If not specified, this attribute is set to false.</p>
1.24 +9 -1 jakarta-tomcat-catalina/webapps/docs/config/http.xml
Index: http.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/http.xml,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- http.xml 22 May 2005 17:18:28 -0000 1.23
+++ http.xml 4 Jun 2005 12:33:38 -0000 1.24
@@ -56,7 +56,14 @@
support the following attributes:</p>
<attributes>
-
+
+ <attribute name="allowedAliasMatches" required="false">
+ <p>Set this attribute to max subdomain alias matches <code>16</code>.
+ Is this attribute >0 the host alias element support Alias Matches
+ (<Alias>*.mydomain.net"</Alias> ).
+ The default value is <code>0</code> no host alias matches support.</p>
+ </attribute>
+
<attribute name="allowTrace" required="false">
<p>A boolean value which can be used to enable or disable the TRACE
HTTP method. If not specified, this attribute is set to false.</p>
@@ -173,6 +180,7 @@
specification. The default value is <code>false</code>.</p>
</attribute>
+
</attributes>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]