tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: Antw: RE: Bug in Tomcat 3.3.1 with getPathInfo() ?
Date Thu, 11 Apr 2002 18:24:06 GMT
It is fairly easy to restore the old Tomcat 3.3 behavior.

1. Create the following directory:

<tomcat_home>/lib/container/classes/org/apache/tomcat/modules/mappers

2. Copy DecoderInterceptor.java from source to this directory.

3. Near the end of the postReadRequest method, make the following
   change:

    try {
	if(debug>1 )
        log( "Before " + pathMB.toString());
	req.getURLDecoder().convert( pathMB , false );
                                            ^^^^^ - change to true
	pathMB.resetStringValue();

4. Compile with lib/common/tomcat_core.jar and lib/container/tomcat_util.jar
   on the classpath.

The new class should override the one in tomcat_modules.jar and
cause '+' to again be translated to ' '.  I will consider reverting this
in Tomcat 3.3.2.

Cheers,
Larry

> -----Original Message-----
> From: Olaf Vetter [mailto:Olaf.Vetter@dvfa.de] 
> Sent: Thursday, April 11, 2002 11:21 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Antw: RE: Bug in Tomcat 3.3.1 with getPathInfo() ?
> 
> 
> But URLEncoder.encode( myPath ) encodes ' ' to '+',
> not '%20'...
> Creating extra path info gets quite difficult now.
> 
> 
> >>> Larry.Isaacs@sas.com 10.04.2002 19:14 >>>
> I think if request.getPathInfo() returns '/Hit+Run', then
> the path info was '/Hit+Run' or '/Hit%2BRun'.   The path
> would have to be '/Hit%20Run' for getPathInfo() to return
> '/Hit Run' on Tomcat 3.3.1.
> 
> Cheers,
> Larry
> 
> 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message