tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pilho Kim <ph...@math.soongsil.ac.kr>
Subject a url-path bug of HttpRequestAdapter ?
Date Thu, 01 Jan 1970 00:00:00 GMT
Try  to visit http://jakarta.tomcat.org/tomc%61t.
Then the url-path will be mapped http://jakarta.tomcat.org/tomcat.

BTW,
if you try  to visit http://localhost:8080/ex%61mples/jsp,
then the url-path decoding of Tomcat will fail.

To solve this bug, we should modify the class
          org.apache.tomcat.service.http.HttpRequestAdapter,
add only the following three lines:

       if (requestURI != null && requestURI.indexOf('%') >= 0) {
          requestURI = RequestUtil.URLDecode(requestURI);
       }

after the lines:

	int indexQ=requestString.indexOf("?");
	int rLen=requestString.length();
	if ( (indexQ >-1) && ( indexQ  < rLen) ) {
	    queryString = requestString.substring(indexQ + 1, requestString.length());
	    requestURI = requestString.substring(0, indexQ);
	} else {
	    requestURI= requestString;
	}

of the method readNextRequest.


This modification needs to every release of Tomcat
from 3.0 to 3.2 today.

I hope that this bug will be corrected.


Thanks

--
Kim



Mime
View raw message