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 Re: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/servic
Date Thu, 01 Jan 1970 00:00:00 GMT
Hi, Ignacio

As you have indicated, I regard that
there is some mistake about the URL-Path patch.

querystring should not be url-decoded there.

Remove the following codes from the patch:

	if ((queryString != null) &&
	    ((queryString.indexOf('%') >= 0) || 
 (queryString.indexOf('+') >= 0))) {

	    try {
		queryString = RequestUtil.URLDecode(queryString);
	    } catch (Exception e) {
		response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
		return;
	    }

Then it will work fine.

Good luck.

Kim, Pilho


> 
> Hola a todos 
> 
> Hi,Craig
> 
> Decoding here the querystring makes all my apps forms to fail.
> 
> It seems that there are a double decoding of the query string here and
> inside the servlets (Oracle's Servlets) so i have needed to delete the
> querystring section of code to no decode it,
> 
> Any Comments? 
> 
> Has anyone tryed the latest CVS code with forms and this kind of things?
> 
> Saludos ,
> Ignacio J. Ortega
> 
> > -----Mensaje original-----
> > De: craigmcc@locus.apache.org [mailto:craigmcc@locus.apache.org]
> > Enviado el: martes 18 de julio de 2000 1:37
> > Para: jakarta-tomcat-cvs@apache.org
> > Asunto: cvs commit:
> > jakarta-tomcat/src/share/org/apache/tomcat/service/http
> > HttpRequestAdapter.java
> > 
> > 
> > craigmcc    00/07/17 16:37:24
> > 
> >   Modified:    src/share/org/apache/tomcat/service/http
> >                         HttpRequestAdapter.java
> >   Log:
> >   Patch request URI (and query string) parsing to peform URL 
> > decoding, using
> >   the utility method in the RequestUtil class.
> >   
> >   Submitted by:	Based on a patch supplied by Pilho Kim
> >     <phkim@math.soongsil.ac.kr>, but modified to reflect 
> > changes in the
> >     HttpRequestAdapter class.
> >   
> >   Revision  Changes    Path
> >   1.18      +25 -3     
> > jakarta-tomcat/src/share/org/apache/tomcat/service/http/HttpRe
> > questAdapter.java
> >   
> >   Index: HttpRequestAdapter.java
> >   ===================================================================
> >   RCS file: 
> > /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/h
> > ttp/HttpRequestAdapter.java,v
> >   retrieving revision 1.17
> >   retrieving revision 1.18
> >   diff -u -r1.17 -r1.18
> >   --- HttpRequestAdapter.java	2000/07/11 03:48:58	1.17
> >   +++ HttpRequestAdapter.java	2000/07/17 23:37:24	1.18
> >   @@ -1,7 +1,7 @@
> >    /*
> >   - * $Header: 
> > /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/h
> > ttp/HttpRequestAdapter.java,v 1.17 2000/07/11 03:48:58 alex Exp $
> >   - * $Revision: 1.17 $
> >   - * $Date: 2000/07/11 03:48:58 $
> >   + * $Header: 
> > /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/h
> > ttp/HttpRequestAdapter.java,v 1.18 2000/07/17 23:37:24 craigmcc Exp $
> >   + * $Revision: 1.18 $
> >   + * $Date: 2000/07/17 23:37:24 $
> >     *
> >     * 
> > ====================================================================
> >     *
> >   @@ -371,6 +371,28 @@
> >    	} else {
> >    	    requestURI = new String( buf, startReq, qryIdx - startReq );
> >    	    queryString = new String( buf, qryIdx+1, endReq - 
> > qryIdx -1 );
> >   +	}
> >   +
> >   +	// Perform URL decoding only if necessary
> >   +	if ((requestURI != null) &&
> >   +	    ((requestURI.indexOf('%') >= 0) || 
> > (requestURI.indexOf('+') >= 0))) {
> >   +
> >   +	    try {
> >   +		requestURI = RequestUtil.URLDecode(requestURI);
> >   +	    } catch (Exception e) {
> >   +		response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
> >   +		return;
> >   +	    }
> >   +	}
> >   +	if ((queryString != null) &&
> >   +	    ((queryString.indexOf('%') >= 0) || 
> > (queryString.indexOf('+') >= 0))) {
> >   +
> >   +	    try {
> >   +		queryString = RequestUtil.URLDecode(queryString);
> >   +	    } catch (Exception e) {
> >   +		response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
> >   +		return;
> >   +	    }
> >    	}
> >    
> >    	//	loghelper.log("XXX " + method + " " + 
> > requestURI + " " + queryString + " " + protocol );
> >   
> >   
> >   
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 


Mime
View raw message