tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1444737 - /tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java
Date Tue, 12 Feb 2013 10:45:12 GMT
2013/2/11  <jfclere@apache.org>:
> Author: jfclere
> Date: Mon Feb 11 11:03:50 2013
> New Revision: 1444737
>
> URL: http://svn.apache.org/r1444737
> Log:
> Make the requestURI string is also reset.
>
> Modified:
>     tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java
>
> Modified: tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java?rev=1444737&r1=1444736&r2=1444737&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/valves/rewrite/RewriteValve.java Mon Feb 11
11:03:50 2013
> @@ -448,6 +448,7 @@ public class RewriteValve extends ValveB
>                          urlString = urlString.substring(0, queryIndex);
>                      }
>                      // Set the new URL
> +                    request.getCoyoteRequest().requestURI().setString(null);
>                      CharChunk chunk = request.getCoyoteRequest().requestURI().getCharChunk();
>                      chunk.recycle();

The above three lines are "manually" clearing the content of requestURI().

I think one should just call MessageBytes.recycle() on that object
instead of bothering with its internals. I have not tested, though.

>                      if (context) {
>

Best regards,
Konstantin Kolinko

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


Mime
View raw message