geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r814083 - /geronimo/external/trunk/tomcat-parent-6.0.20/util/src/main/java/org/apache/tomcat/util/http/mapper/Mapper.java
Date Fri, 11 Sep 2009 23:36:16 GMT
Author: djencks
Date: Fri Sep 11 23:36:16 2009
New Revision: 814083

URL: http://svn.apache.org/viewvc?rev=814083&view=rev
Log:
GERONIMO-4566 port fix for tomcats https://issues.apache.org/bugzilla/show_bug.cgi?id=47378

Modified:
    geronimo/external/trunk/tomcat-parent-6.0.20/util/src/main/java/org/apache/tomcat/util/http/mapper/Mapper.java

Modified: geronimo/external/trunk/tomcat-parent-6.0.20/util/src/main/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-6.0.20/util/src/main/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=814083&r1=814082&r2=814083&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-6.0.20/util/src/main/java/org/apache/tomcat/util/http/mapper/Mapper.java
(original)
+++ geronimo/external/trunk/tomcat-parent-6.0.20/util/src/main/java/org/apache/tomcat/util/http/mapper/Mapper.java
Fri Sep 11 23:36:16 2009
@@ -804,6 +804,32 @@
                                         
         }
 
+        // welcome file processing - take 2
+        // take first matching welcome file that has an extension match
+        // a watered down version of rule 4
+        if (mappingData.wrapper == null) {
+            boolean checkWelcomeFiles = checkJspWelcomeFiles;
+            if (!checkWelcomeFiles) {
+                char[] buf = path.getBuffer();
+                checkWelcomeFiles = (buf[pathEnd - 1] == '/');
+            }
+            if (checkWelcomeFiles) {
+                for (int i = 0; (i < context.welcomeResources.length)
+                         && (mappingData.wrapper == null); i++) {
+                    path.setOffset(pathOffset);
+                    path.setEnd(pathEnd);
+                    path.append(context.welcomeResources[i], 0,
+                                context.welcomeResources[i].length());
+                    path.setOffset(servletPath);
+                    internalMapExtensionWrapper(extensionWrappers,
+                                                path, mappingData);
+                }
+
+                path.setOffset(servletPath);
+                path.setEnd(pathEnd);
+            }
+        }
+
 
         // Rule 7 -- Default servlet
         if (mappingData.wrapper == null && !checkJspWelcomeFiles) {



Mime
View raw message