You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/07/04 00:07:05 UTC
svn commit: r673839 - in /tomcat/tc6.0.x/trunk: ./
java/org/apache/catalina/core/ApplicationContext.java
Author: markt
Date: Thu Jul 3 15:07:04 2008
New Revision: 673839
URL: http://svn.apache.org/viewvc?rev=673839&view=rev
Log:
Extract the query string before we try to normalise the URI
Modified:
tomcat/tc6.0.x/trunk/ (props changed)
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 3 15:07:04 2008
@@ -1 +1 @@
-/tomcat/trunk:673796
+/tomcat/trunk:673796,673820
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=673839&r1=673838&r2=673839&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java Thu Jul 3 15:07:04 2008
@@ -369,10 +369,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();
+
// Use the thread local URI and mapping data
DispatchData dd = dispatchData.get();
if (dd == null) {
@@ -383,15 +394,6 @@
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;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org