remm        02/04/18 02:12:52

  Modified:    coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java
  Log:
  - Move the decodedURI field to the adapter. Although this is part of the protocol,
    it is more a convinience feature used in TC "4.1".
  - Although I didn't test it, this should fix the mapping problems with JK2 (since
    the decodedURI field was used for mapping, I can understand why it didn't
    work too well if it was empty).
  
  Revision  Changes    Path
  1.5       +11 -4     
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
  
  Index: CoyoteAdapter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CoyoteAdapter.java        16 Apr 2002 21:59:36 -0000      1.4
  +++ CoyoteAdapter.java        18 Apr 2002 09:12:52 -0000      1.5
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
 1.4 2002/04/16 21:59:36 remm Exp $
  - * $Revision: 1.4 $
  - * $Date: 2002/04/16 21:59:36 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
 1.5 2002/04/18 09:12:52 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/04/18 09:12:52 $
    *
    * ====================================================================
    *
  @@ -119,7 +119,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.4 $ $Date: 2002/04/16 21:59:36 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/18 09:12:52 $
    */
   
   final class CoyoteAdapter
  @@ -277,12 +277,19 @@
               request.setServerName(req.serverName().toString());
           }
   
  +        // URI decoding
  +        req.decodedURI().duplicate(req.requestURI());
  +        req.getURLDecoder().convert(req.decodedURI(), true);
  +        req.decodedURI().setEncoding("UTF-8");
  +
  +        // Normalize decoded URI
           if (!normalize(req.decodedURI())) {
               res.setStatus(400);
               res.setMessage("Invalid URI");
               throw new IOException("Invalid URI");
           }
   
  +        // Parse session Id
           parseSessionId(req, request);
   
           // Additional URI normalization and validation is needed for security 
  
  
  

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

Reply via email to