From: markt Date: Thu, 3 Jul 2008 21:26:13 +0000 (+0000) Subject: Extract the query string before we try to normalise the URI X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=98c2000643c1b4055b78db361f2de06efa7e9d4d;p=tomcat7.0 Extract the query string before we try to normalise the URI git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@673820 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/core/ApplicationContext.java b/java/org/apache/catalina/core/ApplicationContext.java index eb4db2782..19214e5d9 100644 --- a/java/org/apache/catalina/core/ApplicationContext.java +++ b/java/org/apache/catalina/core/ApplicationContext.java @@ -369,10 +369,21 @@ public class ApplicationContext 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(); + // Use the thread local URI and mapping data DispatchData dd = dispatchData.get(); if (dd == null) { @@ -383,15 +394,6 @@ public class ApplicationContext MessageBytes uriMB = dd.uriMB; uriMB.recycle(); - // Get query string - String queryString = null; - int pos = path.indexOf('?'); - if (pos >= 0) { - queryString = path.substring(pos + 1); - } else { - pos = path.length(); - } - // Use the thread local mapping data MappingData mappingData = dd.mappingData;