vmassol     2002/09/26 06:17:15

  Modified:    framework/src/java/share/org/apache/cactus WebResponse.java
               documentation/docs/xdocs changes.xml
  Log:
  New <code>WebResponse.getCookieIgnoreCase(cookieName)</code> to get the first cookie 
matching <code>cookieName</code> whatever the case (case-insensitive).
  
  Revision  Changes    Path
  1.8       +27 -1     
jakarta-cactus/framework/src/java/share/org/apache/cactus/WebResponse.java
  
  Index: WebResponse.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/WebResponse.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WebResponse.java  28 Aug 2002 21:06:41 -0000      1.7
  +++ WebResponse.java  26 Sep 2002 13:17:15 -0000      1.8
  @@ -236,6 +236,32 @@
       }
   
       /**
  +     * Return the first cookie found that has the specified name or null
  +     * if not found. The name is case-insensitive.
  +     *
  +     * @param theName the cookie name to find (case-insensitive)
  +     * @return the cookie or null if not found
  +     */
  +    public Cookie getCookieIgnoreCase(String theName)
  +    {
  +        Cookie result = null;
  +
  +        Cookie[] cookies = getCookies();
  +
  +        for (int i = 0; i < cookies.length; i++)
  +        {
  +            if (cookies[i].getName().equalsIgnoreCase(theName))
  +            {
  +                result = cookies[i];
  +
  +                break;
  +            }
  +        }
  +
  +        return result;
  +    }
  +
  +    /**
        * @return the cookies returned by the server
        */
       public Cookie[] getCookies()
  
  
  
  1.51      +5 -0      jakarta-cactus/documentation/docs/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/changes.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- changes.xml       15 Sep 2002 21:16:12 -0000      1.50
  +++ changes.xml       26 Sep 2002 13:17:15 -0000      1.51
  @@ -48,6 +48,11 @@
       </devs>
   
       <release version="1.5" date="- in CVS">
  +      <action dev="VMA" type="add">
  +        New <code>WebResponse.getCookieIgnoreCase(cookieName)</code> to get
  +        the first cookie matching <code>cookieName</code> whatever the case
  +        (case-insensitive).
  +      </action>
         <action dev="VMA" type="add" due-to="Jason Robertson" 
due-to-email="[EMAIL PROTECTED]">
           Added Form-based authentication support (Submitted by Jason Robertson).
         </action>
  
  
  

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

Reply via email to