vmassol     01/09/22 07:19:17

  Modified:    src/sample/share/org/apache/cactus/sample
                        TestSampleServlet.java
  Log:
  decode returned cookie value to take into account servers that encode cookie value 
(Tomcat 4.0)
  
  Revision  Changes    Path
  1.11      +9 -2      
jakarta-cactus/src/sample/share/org/apache/cactus/sample/TestSampleServlet.java
  
  Index: TestSampleServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/sample/share/org/apache/cactus/sample/TestSampleServlet.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestSampleServlet.java    2001/09/16 11:09:42     1.10
  +++ TestSampleServlet.java    2001/09/22 14:19:17     1.11
  @@ -68,7 +68,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: TestSampleServlet.java,v 1.10 2001/09/16 11:09:42 vmassol Exp $
  + * @version $Id: TestSampleServlet.java,v 1.11 2001/09/22 14:19:17 vmassol Exp $
    */
   public class TestSampleServlet extends ServletTestCase
   {
  @@ -367,7 +367,14 @@
   
           assert("Cannot find [responsecookie]", cookie != null);
           assertEquals("responsecookie", cookie.getName());
  -        assertEquals("this is a response cookie", cookie.getValue());
  +
  +        // Some servers may encode the cookie value (ex: the latest
  +        // version of Tomcat 4.0). In order for this test to succeed on
  +        // all servlet engine, we URL decode the cookie value before
  +        // comparing it.
  +        assertEquals("this is a response cookie",
  +            URLDecoder.decode(cookie.getValue()));
  +
           assertEquals("jakarta.apache.org", cookie.getDomain());
       }
   
  
  
  

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

Reply via email to