luehe       2003/09/12 12:54:57

  Modified:    catalina/src/share/org/apache/catalina/util RequestUtil.java
  Log:
  Reverted patch for 4918152 ("using % in the value of jsp:param
  corrupts the query string"), as it is not needed for JSP 2.0.
  
  JSP.5.6 ("<jsp:param>") has clarified the potential trouble spot as follows:
  
    The parameter names and values specified should be left unencoded by the
    page author. The JSP container must encode the parameter names and values
    using the character encoding from the request object when necessary. For
    example, if the container chooses to append the parameters to the URL in
    the dispatched request, both the names and values must be encoded as per
    the content type application/x-www-form-urlencoded in the HTML specification.
  
  Revision  Changes    Path
  1.6       +6 -11     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/RequestUtil.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RequestUtil.java  11 Sep 2003 01:59:51 -0000      1.5
  +++ RequestUtil.java  12 Sep 2003 19:54:56 -0000      1.6
  @@ -536,13 +536,8 @@
                       data[ox++] = (byte)' ';
                       break;
                   case '%':
  -                    if ((ix <= (data.length - 2)) &&
  -                        ((char)data[ix] != '&') && ((char)data[ix+1] != '&')) {
  -                        data[ox++] = (byte)((convertHexDigit(data[ix++]) << 4)
  -                                           + convertHexDigit(data[ix++]));
  -                    } else {
  -                        data[ox++] = c;
  -                    }
  +                    data[ox++] = (byte)((convertHexDigit(data[ix++]) << 4)
  +                                    + convertHexDigit(data[ix++]));
                       break;
                   default:
                       data[ox++] = c;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to