tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Soutter" <ge...@whitewolf.com.au>
Subject Re: percent decoding - please?
Date Wed, 28 Jun 2000 01:28:09 GMT
"Costin Manolache" <costin@eng.sun.com> wrote:

> Please send again - I have far too much mail.

sure, heres the other guys "patch", from a while back I mentioned, my
original one is out of date now.


"Pilho Kim" <phkim@math.soongsil.ac.kr> wrote:

> Hi,
>
> I have seen the most recent source of the class
> share.org.apache.tomcat,service.http.HttpRequestAdapter (Revision: 1.15).
>
>     $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpReques
tAdapter.java,v 1.15 2000/05/26 17:32:16 costin Exp $
>     $Revision: 1.15 $
>     $Date: 2000/05/26 17:32:16 $
>
>
> But this contains a URL-path bug, i.e.,
> Tomcat cannot not mapped the encoded URL-path such as
>
>      http://localhost:8080/ex%61mples/jsp
>
> I regard that It should be mapped to http://localhost:8080/examples/jsp.
>
> To fix this bug, I have modified HttpRequestAdapter.
>
> Before modifying:
>
> int qryIdx= findChar( '?', startReq, endReq );
> if( qryIdx <0 ) {
>     requestURI = new String( buf, startReq, endReq - startReq );
> } else {
>     requestURI = new String( buf, startReq, qryIdx - startReq );
>     queryString = new String( buf, qryIdx+1, endReq - qryIdx -1 );
> }
>
> After modifying:
>
> int qryIdx= findChar( '?', startReq, endReq );
> if( qryIdx <0 ) {
>     requestURI = new String( buf, startReq, endReq - startReq );
> } else {
>     requestURI = new String( buf, startReq, qryIdx - startReq );
>     queryString = new String( buf, qryIdx+1, endReq - qryIdx -1 );
> }
>
>         // Add only these three lines to fix a URL-path bug.
>         if (requestURI != null && requestURI.indexOf('%') >= 0) {
>             requestURI = RequestUtil.URLDecode(requestURI);
>         }
>
>
>
> I hope that this URL-path bug will be fixed.
>
>
> Thanks a lot
>
> --
> Kim



Mime
View raw message