You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Nacho <na...@siapi.es> on 2000/07/21 18:29:17 UTC

RE: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/servic e/http HttpRequestAdapter.java

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
>     <ph...@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
>