tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup LocalStrings.properties UserConfig.java
Date Wed, 05 Sep 2001 00:31:50 GMT
craigmcc    01/09/04 17:31:50

  Modified:    catalina/src/share/org/apache/catalina/connector/http
                        HttpProcessor.java
               catalina/src/share/org/apache/catalina/startup
                        LocalStrings.properties UserConfig.java
  Log:
  Re-fix the "User Web Applications" feature that allows you to
  automatically configure context paths for user public_html directories.
  It got broken when adding some request URI normalization code.
  
  The criteria for publishing a user web applcation is now simply that the
  public_html directory exists and is readable.  Previously, UserConfig was
  also requiring that a WEB-INF/web.xml file be present, but this would not
  generally be true for users publishing simple static web sites under their
  user directories.
  
  PR: Bugzilla #2949
  Submitted by:	Robert Evans <rbe@akane.jhuapl.edu>
  
  Revision  Changes    Path
  1.36      +9 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- HttpProcessor.java	2001/08/09 19:43:00	1.35
  +++ HttpProcessor.java	2001/09/05 00:31:50	1.36
  @@ -1,6 +1,6 @@
  -/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.35 2001/08/09 19:43:00 craigmcc Exp $
  - * $Revision: 1.35 $
  - * $Date: 2001/08/09 19:43:00 $
  +/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.36 2001/09/05 00:31:50 craigmcc Exp $
  + * $Revision: 1.36 $
  + * $Date: 2001/09/05 00:31:50 $
    *
    * ====================================================================
    *
  @@ -106,7 +106,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.35 $ $Date: 2001/08/09 19:43:00 $
  + * @version $Revision: 1.36 $ $Date: 2001/09/05 00:31:50 $
    */
   
   final class HttpProcessor
  @@ -828,6 +828,11 @@
   
           // Create a place for the normalized path
           String normalized = path;
  +
  +        // Normalize "/%7E" and "/%7e" at the beginning to "/~"
  +        if (normalized.startsWith("/%7E") ||
  +            normalized.startsWith("/%7e"))
  +            normalized = "/~" + normalized.substring(4);
   
           // Prevent encoding '%', '/', '.' and '\', which are special reserved
           // characters
  
  
  
  1.12      +1 -0      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LocalStrings.properties	2000/10/18 04:19:08	1.11
  +++ LocalStrings.properties	2001/09/05 00:31:50	1.12
  @@ -44,6 +44,7 @@
   hostConfig.undeploying=Undeploying deployed web applications
   userConfig.database=Exception loading user database
   userConfig.deploy=Deploying web application for user {0}
  +userConfig.deploying=Deploying user web applications
   userConfig.error=Error deploying web application for user {0}
   userConfig.start=UserConfig: Processing START
   userConfig.stop=UserConfig: Processing STOP
  
  
  
  1.3       +7 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/UserConfig.java
  
  Index: UserConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/UserConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UserConfig.java	2001/07/22 20:25:13	1.2
  +++ UserConfig.java	2001/09/05 00:31:50	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/UserConfig.java,v
1.2 2001/07/22 20:25:13 pier Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/22 20:25:13 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/UserConfig.java,v
1.3 2001/09/05 00:31:50 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/09/05 00:31:50 $
    *
    * ====================================================================
    *
  @@ -85,7 +85,7 @@
    * xxxxx is the username of the owning user for that web application
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/07/22 20:25:13 $
  + * @version $Revision: 1.3 $ $Date: 2001/09/05 00:31:50 $
    */
   
   public final class UserConfig
  @@ -349,15 +349,17 @@
       private void deploy(String user, String home) {
   
           // Does this user have a web application to be deployed?
  -        String contextPath = "~" + user;
  +        String contextPath = "/~" + user;
           if (host.findChild(contextPath) != null)
               return;
           File app = new File(home, directoryName);
           if (!app.exists() || !app.isDirectory())
               return;
  +        /*
           File dd = new File(app, "/WEB-INF/web.xml");
           if (!dd.exists() || !dd.isFile() || !dd.canRead())
               return;
  +        */
           log(sm.getString("userConfig.deploy", user));
   
           // Deploy the web application for this user
  
  
  

Mime
View raw message