tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators StaticInterceptor.java
Date Wed, 17 Apr 2002 02:41:49 GMT
billbarker    02/04/16 19:41:49

  Modified:    src/share/org/apache/tomcat/modules/generators
                        StaticInterceptor.java
  Log:
  Preserve the query string when doing a redirect to the index page.
  
  Reported as bug #8099 against 4.0
  Reported by: Jurgen Mossgraber mossgraber@iitb.fhg.de
  
  Revision  Changes    Path
  1.21      +6 -0      jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java
  
  Index: StaticInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/StaticInterceptor.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StaticInterceptor.java	16 Apr 2002 03:04:55 -0000	1.20
  +++ StaticInterceptor.java	17 Apr 2002 02:41:49 -0000	1.21
  @@ -191,6 +191,9 @@
   	if( welcomeFile==null && ! requestURI.endsWith("/") ) {
   	    String redirectURI= requestURI + "/";
   	    redirectURI=fixURLRewriting( req, redirectURI );
  +	    String query = req.query().toString();
  +	    if( query != null && !query.equals("") )
  +		redirectURI += "?" + query;
   	    req.setAttribute("javax.servlet.error.message",
   			     redirectURI);
   	    if( debug > 0) log( "Redirect " + redirectURI );
  @@ -216,6 +219,9 @@
   	String redirectURI=null;
   	redirectURI=concatPath( requestURI, welcomeFile);
   	redirectURI=fixURLRewriting( req, redirectURI );
  +	String query = req.query().toString();
  +	if( query != null && !query.equals("") )
  +	    redirectURI += "?" + query;
   
   	req.setAttribute("javax.servlet.error.message",
   			 redirectURI);
  
  
  

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


Mime
View raw message