billbarker    2004/09/29 23:02:39

  Modified:    src/facade22/org/apache/tomcat/facade
                        RequestDispatcherImpl.java
  Log:
  Set the correct query-string on forwards.
  
  The parameters are the sum of the forward URI and the request URI, but the 
query-string is the one from the forward URI according to the spec.
  
  This still needs some work to handle the post-request clean-up.
  
  Fix for Bug #31474
  Reported By: Marc Daniels  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.29      +7 -5      
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.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- RequestDispatcherImpl.java        23 Feb 2004 06:06:13 -0000      1.28
  +++ RequestDispatcherImpl.java        30 Sep 2004 06:02:39 -0000      1.29
  @@ -193,7 +193,7 @@
        //realRequest.query().recycle();
        realRequest.servletPath().recycle();
        realRequest.pathInfo().recycle();
  -    realRequest.setChild(null);
  +     realRequest.setChild(null);
   
        // merge query string as specified in specs - before, it may affect
        // the way the request is handled by special interceptors
  @@ -201,11 +201,11 @@
            // 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 new one and old one.
  +         // Set the query string - the new one.
            String oldQS=realRequest.queryString().toString();
  -         String newQS=(oldQS==null ) ? queryString : queryString + "&" +
  -             oldQS;
  -         realRequest.queryString().setString(newQS);
  +         // String newQS=(oldQS==null ) ? queryString : queryString + "&" +
  +         //  oldQS;
  +         realRequest.queryString().setString(queryString);
   
            // Process the additional parsm. We don't know if the old
            // params were processed ( so we need to make sure they are,
  @@ -215,6 +215,8 @@
   
            child.processParameters( queryString );
            //realRequest.parameters().processParameters( queryString ); 
  +     } else {
  +         realRequest.queryString().recycle();
        }
        
        // run the new request through the context manager
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to