billbarker 01/10/04 20:33:29
Modified: src/share/org/apache/tomcat/modules/mappers
DecodeInterceptor.java
Log:
Improve the handling of the saveOriginal option, by adding support for broken
clients (e.g. telnet).
If the (broken) client does a request for something like:
/myApp/servlet/myServlet/path&info
we still give the servlet the original requested URI even though the client
incorrectly didn't encode the request.
Revision Changes Path
1.11 +2 -2
jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/DecodeInterceptor.java
Index: DecodeInterceptor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/DecodeInterceptor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DecodeInterceptor.java 2001/10/04 20:25:05 1.10
+++ DecodeInterceptor.java 2001/10/05 03:33:29 1.11
@@ -526,10 +526,10 @@
if( debug> 5 ) log("Already decoded " + req.getNote( decodedNote ));
return 0;
}
+ if( saveOriginal )
+ req.unparsedURI().duplicate( pathMB );
if (pathMB.indexOf('%') >= 0 || pathMB.indexOf( '+' ) >= 0) {
try {
- if( saveOriginal )
- req.unparsedURI().duplicate( pathMB );
if(debug>1 )
log( "Before " + pathMB.toString());
req.getURLDecoder().convert( pathMB );