tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r680949 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
Date Wed, 30 Jul 2008 09:34:27 GMT
Author: markt
Date: Wed Jul 30 02:34:21 2008
New Revision: 680949

URL: http://svn.apache.org/viewvc?rev=680949&view=rev
Log:
Port r673820 to 5.5.x
Extract the query string before we try to normalise the URI

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java?rev=680949&r1=680948&r2=680949&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
Wed Jul 30 02:34:21 2008
@@ -379,10 +379,21 @@
             throw new IllegalArgumentException
                 (sm.getString
                  ("applicationContext.requestDispatcher.iae", path));
+
+        // Get query string
+        String queryString = null;
+        int pos = path.indexOf('?');
+        if (pos >= 0) {
+            queryString = path.substring(pos + 1);
+            path = path.substring(0, pos); 
+        }
+ 
         path = normalize(path);
         if (path == null)
             return (null);
 
+        pos = path.length();
+
         // Retrieve the thread local URI
         MessageBytes uriMB = (MessageBytes) localUriMB.get();
         if (uriMB == null) {
@@ -394,15 +405,6 @@
             uriMB.recycle();
         }
 
-        // Get query string
-        String queryString = null;
-        int pos = path.indexOf('?');
-        if (pos >= 0) {
-            queryString = path.substring(pos + 1);
-        } else {
-            pos = path.length();
-        }
- 
         // Retrieve the thread local mapping data
         MappingData mappingData = (MappingData) localMappingData.get();
         if (mappingData == null) {



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


Mime
View raw message