costin 01/08/25 18:47:41
Modified: src/facade22/org/apache/tomcat/facade
RequestDispatcherImpl.java
Log:
Another fix for RD, the queryString wasn't updated in the forwarded request.
I'm not sure if the query string is a 'path' property, but for consistency I
think it must be updated ( including the additional parameters and the old
ones ).
Revision Changes Path
1.21 +12 -4
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java
Index: RequestDispatcherImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- RequestDispatcherImpl.java 2001/08/25 18:11:12 1.20
+++ RequestDispatcherImpl.java 2001/08/26 01:47:41 1.21
@@ -233,11 +233,19 @@
// merge query string as specified in specs - before, it may affect
// the way the request is handled by special interceptors
if( queryString != null ) {
- realRequest.queryString().setString(queryString);
- // Append queryString to the request parameters -
- // the original request is changed.
+ // Process existing parameters, if not already done so
+ // ( otherwise we'll process some twice )
+ realRequest.parameters().handleQueryParameters();
+ // Set the query string - the sum of the old one and new one.
+ String oldQS=realRequest.queryString().toString();
+ String newQS=(oldQS==null ) ? queryString : oldQS + "&" +
+ queryString;
+ realRequest.queryString().setString(newQS);
+
+ // Process the additional parsm. We don't know if the old
+ // params were processed ( so we need to make sure they are,
+ // i.e. a known state ).
realRequest.parameters().processParameters( queryString );
- // addQueryString( realRequest, queryString );
}
// run the new request through the context manager