You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/08/12 04:13:25 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators StaticInterceptor.java

costin      01/08/11 19:13:25

  Modified:    src/share/org/apache/tomcat/modules/generators
                        StaticInterceptor.java
  Log:
  Add extra "/" for dirs, in StaticInterceptor. That avoids a roundtrip and
  some problems with IE.
  
  Revision  Changes    Path
  1.15      +6 -4      jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java
  
  Index: StaticInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StaticInterceptor.java	2001/06/21 19:31:04	1.14
  +++ StaticInterceptor.java	2001/08/12 02:13:25	1.15
  @@ -493,9 +493,11 @@
   	    
   	    toPath = toPath.substring(0, toPath.lastIndexOf("/"));
   	    
  -	    if (toPath.length() == 0) {
  -		toPath = "/";
  -	    }
  +	    //if (toPath.length() == 0) {
  +	    //toPath = "/";
  +	    //}
  +	    // Add trailing "/"
  +	    toPath += "/";
   	    
   	    buf.write("<a href=\"");
   	    utfEncoder.urlEncode( buf, toPath);
  @@ -552,7 +554,7 @@
                   buf.write("<tt><a href=\"");
   		utfEncoder.urlEncode( buf, slashedRequestURI);
   		utfEncoder.urlEncode( buf, fileN);
  -		buf.write("\">");
  +		buf.write("/\">");
   		buf.write(fileN);
   		buf.write("/</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
   		buf.write("</tt>\r\n");