[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    svn commit: r558519 - in
From:       olegk () apache ! org
Date:       2007-07-22 18:19:51
Message-ID: 20070722181952.B72081A981A () eris ! apache ! org
[Download RAW message or body]

Author: olegk
Date: Sun Jul 22 11:19:49 2007
New Revision: 558519

URL: http://svn.apache.org/viewvc?view=rev&rev=558519
Log:
Split Cookie interface into a generic non-mutable Cookie interface and mutable \
SetCookie interface representing SetCookie response header sent by the origin server \
to the HTTP agent in order to maintain a conversational state

Added:
    jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/SetCookie.java
                
      - copied, changed from r558516, \
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java
 Modified:
    jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCommentHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCookie.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicDomainHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicExpiresHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicMaxAgeHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicPathHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicSecureHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109DomainHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109VersionHandler.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/cookie/TestCookiePathComparator.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestAbstractCookieSpec.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBrowserCompatSpec.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestNetscapeCookieAttribHandlers.java
  jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestRFC2109CookieAttribHandlers.java


Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/cookie/Cookie.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java \
Sun Jul 22 11:19:49 2007 @@ -69,16 +69,6 @@
     String getComment();
 
     /**
-     * If a user agent (web browser) presents this cookie to a user, the
-     * cookie's purpose will be described using this comment.
-     * 
-     * @param comment
-     *  
-     * @see #getComment()
-     */
-    void setComment(String comment);
-
-    /**
      * Returns the expiration {@link Date} of the cookie, or <tt>null</tt>
      * if none exists.
      * <p><strong>Note:</strong> the object returned by this method is 
@@ -92,20 +82,6 @@
     Date getExpiryDate();
 
     /**
-     * Sets expiration date.
-     * <p><strong>Note:</strong> the object returned by this method is considered
-     * immutable. Changing it (e.g. using setTime()) could result in undefined 
-     * behaviour. Do so at your peril.</p>
-     *
-     * @param expiryDate the {@link Date} after which this cookie is no longer \
                valid.
-     *
-     * @see #getExpiryDate
-     *
-     */
-    void setExpiryDate (Date expiryDate);
-
-
-    /**
      * Returns <tt>false</tt> if the cookie should be discarded at the end
      * of the "session"; <tt>true</tt> otherwise.
      *
@@ -114,7 +90,6 @@
      */
     boolean isPersistent();
 
-
     /**
      * Returns domain attribute of the cookie.
      * 
@@ -125,16 +100,6 @@
     String getDomain();
 
     /**
-     * Sets the domain attribute.
-     * 
-     * @param domain The value of the domain attribute
-     *
-     * @see #getDomain
-     */
-    void setDomain(String domain);
-
-
-    /**
      * Returns the path attribute of the cookie
      * 
      * @return The value of the path attribute.
@@ -144,36 +109,12 @@
     String getPath();
 
     /**
-     * Sets the path attribute.
-     *
-     * @param path The value of the path attribute
-     *
-     * @see #getPath
-     *
-     */
-    void setPath(String path);
-
-    /**
      * @return <code>true</code> if this cookie should only be sent over secure \
                connections.
      * @see #setSecure(boolean)
      */
     boolean isSecure();
 
     /**
-     * Sets the secure attribute of the cookie.
-     * <p>
-     * When <tt>true</tt> the cookie should only be sent
-     * using a secure protocol (https).  This should only be set when
-     * the cookie's originating server used a secure protocol to set the
-     * cookie's value.
-     *
-     * @param secure The value of the secure attribute
-     * 
-     * @see #isSecure()
-     */
-    void setSecure (boolean secure);
-
-    /**
      * Returns the version of the cookie specification to which this
      * cookie conforms.
      *
@@ -185,16 +126,6 @@
     int getVersion();
 
     /**
-     * Sets the version of the cookie specification to which this
-     * cookie conforms. 
-     *
-     * @param version the version of the cookie.
-     * 
-     * @see #getVersion
-     */
-    void setVersion(int version);
-
-    /**
      * Returns true if this cookie has expired.
      * @param date Current time
      * 
@@ -203,21 +134,6 @@
     boolean isExpired(final Date date);
 
     /**
-     * Indicates whether the cookie had a path specified in a 
-     * path attribute of the <tt>Set-Cookie</tt> header. This value
-     * is important for generating the <tt>Cookie</tt> header because 
-     * some cookie specifications require that the <tt>Cookie</tt> header 
-     * should only include a path attribute if the cookie's path 
-     * was specified in the <tt>Set-Cookie</tt> header.
-     *
-     * @param value <tt>true</tt> if the cookie's path was explicitly 
-     * set, <tt>false</tt> otherwise.
-     * 
-     * @see #isPathAttributeSpecified
-     */
-    public void setPathAttributeSpecified(boolean value);
-
-    /**
      * Returns <tt>true</tt> if cookie's path was set via a path attribute
      * in the <tt>Set-Cookie</tt> header.
      *
@@ -227,21 +143,6 @@
      * @see #setPathAttributeSpecified
      */
     boolean isPathAttributeSpecified();
-
-    /**
-     * Indicates whether the cookie had a domain specified in a 
-     * domain attribute of the <tt>Set-Cookie</tt> header. This value
-     * is important for generating the <tt>Cookie</tt> header because 
-     * some cookie specifications require that the <tt>Cookie</tt> header 
-     * should only include a domain attribute if the cookie's domain 
-     * was specified in the <tt>Set-Cookie</tt> header.
-     *
-     * @param value <tt>true</tt> if the cookie's domain was explicitly 
-     * set, <tt>false</tt> otherwise.
-     *
-     * @see #isDomainAttributeSpecified
-     */
-    void setDomainAttributeSpecified(boolean value);
 
     /**
      * Returns <tt>true</tt> if cookie's domain was set via a domain 

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/CookieAttributeHandler.java \
Sun Jul 22 11:19:49 2007 @@ -52,7 +52,7 @@
    * @param cookie {@link org.apache.http.cookie.Cookie} to be updated
    * @param value cookie attribute value from the cookie response header
    */
-  void parse(Cookie cookie, String value)
+  void parse(SetCookie cookie, String value)
           throws MalformedCookieException;
 
   /**

Copied: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/SetCookie.java \
(from r558516, jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java)
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/cookie/SetCookie.java?view=diff&rev=558519&p1=jakarta/ \
httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Coo \
kie.java&r1=558516&p2=jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/SetCookie.java&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/Cookie.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/cookie/SetCookie.java \
Sun Jul 22 11:19:49 2007 @@ -34,39 +34,14 @@
 import java.util.Date;
 
 /**
- * HTTP "magic-cookie" represents a piece of state information
- * that the HTTP agent and the target server can exchange to maintain 
- * a session.
+ * This interface represents a <code>SetCookie</code> response header sent by the 
+ * origin server to the HTTP agent in order to maintain a conversational state.
  * 
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  * 
  * @since 4.0
  */
-public interface Cookie {
-
-    /**
-     * Returns the name.
-     *
-     * @return String name The name
-     */
-    String getName();
-
-    /**
-     * Returns the value.
-     *
-     * @return String value The current value.
-     */
-    String getValue();
-
-    /**
-     * Returns the comment describing the purpose of this cookie, or
-     * <tt>null</tt> if no such comment has been defined.
-     * 
-     * @return comment 
-     *
-     * @see #setComment(String)
-     */
-    String getComment();
+public interface SetCookie extends Cookie {
 
     /**
      * If a user agent (web browser) presents this cookie to a user, the
@@ -79,19 +54,6 @@
     void setComment(String comment);
 
     /**
-     * Returns the expiration {@link Date} of the cookie, or <tt>null</tt>
-     * if none exists.
-     * <p><strong>Note:</strong> the object returned by this method is 
-     * considered immutable. Changing it (e.g. using setTime()) could result
-     * in undefined behaviour. Do so at your peril. </p>
-     * @return Expiration {@link Date}, or <tt>null</tt>.
-     *
-     * @see #setExpiryDate(java.util.Date)
-     *
-     */
-    Date getExpiryDate();
-
-    /**
      * Sets expiration date.
      * <p><strong>Note:</strong> the object returned by this method is considered
      * immutable. Changing it (e.g. using setTime()) could result in undefined 
@@ -104,26 +66,6 @@
      */
     void setExpiryDate (Date expiryDate);
 
-
-    /**
-     * Returns <tt>false</tt> if the cookie should be discarded at the end
-     * of the "session"; <tt>true</tt> otherwise.
-     *
-     * @return <tt>false</tt> if the cookie should be discarded at the end
-     *         of the "session"; <tt>true</tt> otherwise
-     */
-    boolean isPersistent();
-
-
-    /**
-     * Returns domain attribute of the cookie.
-     * 
-     * @return the value of the domain attribute
-     *
-     * @see #setDomain(java.lang.String)
-     */
-    String getDomain();
-
     /**
      * Sets the domain attribute.
      * 
@@ -133,16 +75,6 @@
      */
     void setDomain(String domain);
 
-
-    /**
-     * Returns the path attribute of the cookie
-     * 
-     * @return The value of the path attribute.
-     * 
-     * @see #setPath(java.lang.String)
-     */
-    String getPath();
-
     /**
      * Sets the path attribute.
      *
@@ -154,12 +86,6 @@
     void setPath(String path);
 
     /**
-     * @return <code>true</code> if this cookie should only be sent over secure \
                connections.
-     * @see #setSecure(boolean)
-     */
-    boolean isSecure();
-
-    /**
      * Sets the secure attribute of the cookie.
      * <p>
      * When <tt>true</tt> the cookie should only be sent
@@ -174,17 +100,6 @@
     void setSecure (boolean secure);
 
     /**
-     * Returns the version of the cookie specification to which this
-     * cookie conforms.
-     *
-     * @return the version of the cookie.
-     * 
-     * @see #setVersion(int)
-     *
-     */
-    int getVersion();
-
-    /**
      * Sets the version of the cookie specification to which this
      * cookie conforms. 
      *
@@ -195,14 +110,6 @@
     void setVersion(int version);
 
     /**
-     * Returns true if this cookie has expired.
-     * @param date Current time
-     * 
-     * @return <tt>true</tt> if the cookie has expired.
-     */
-    boolean isExpired(final Date date);
-
-    /**
      * Indicates whether the cookie had a path specified in a 
      * path attribute of the <tt>Set-Cookie</tt> header. This value
      * is important for generating the <tt>Cookie</tt> header because 
@@ -218,17 +125,6 @@
     public void setPathAttributeSpecified(boolean value);
 
     /**
-     * Returns <tt>true</tt> if cookie's path was set via a path attribute
-     * in the <tt>Set-Cookie</tt> header.
-     *
-     * @return value <tt>true</tt> if the cookie's path was explicitly 
-     * set, <tt>false</tt> otherwise.
-     * 
-     * @see #setPathAttributeSpecified
-     */
-    boolean isPathAttributeSpecified();
-
-    /**
      * Indicates whether the cookie had a domain specified in a 
      * domain attribute of the <tt>Set-Cookie</tt> header. This value
      * is important for generating the <tt>Cookie</tt> header because 
@@ -242,17 +138,6 @@
      * @see #isDomainAttributeSpecified
      */
     void setDomainAttributeSpecified(boolean value);
-
-    /**
-     * Returns <tt>true</tt> if cookie's domain was set via a domain 
-     * attribute in the <tt>Set-Cookie</tt> header.
-     *
-     * @return value <tt>true</tt> if the cookie's domain was explicitly 
-     * set, <tt>false</tt> otherwise.
-     *
-     * @see #setDomainAttributeSpecified
-     */
-    boolean isDomainAttributeSpecified();
 
 }
 

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCommentHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicCommentHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCommentHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCommentHandler.java \
Sun Jul 22 11:19:49 2007 @@ -30,8 +30,8 @@
  */ 
 package org.apache.http.impl.cookie;
 
-import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class BasicCommentHandler extends AbstractCookieAttributeHandler {
 
@@ -39,7 +39,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCookie.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicCookie.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCookie.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicCookie.java \
Sun Jul 22 11:19:49 2007 @@ -33,7 +33,7 @@
 
 import java.util.Date;
 
-import org.apache.http.cookie.Cookie;
+import org.apache.http.cookie.SetCookie;
 import org.apache.http.util.CharArrayBuffer;
 
 /**
@@ -56,7 +56,7 @@
  * 
  * @version $Revision$
  */
-public class BasicCookie implements Cookie {
+public class BasicCookie implements SetCookie {
 
     /**
      * Default Constructor taking a name and a value. The value may be null.

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicDomainHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicDomainHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicDomainHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicDomainHandler.java \
Sun Jul 22 11:19:49 2007 @@ -34,6 +34,7 @@
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class BasicDomainHandler implements CookieAttributeHandler {
 
@@ -41,7 +42,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicExpiresHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicExpiresHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicExpiresHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicExpiresHandler.java \
Sun Jul 22 11:19:49 2007 @@ -30,8 +30,8 @@
  */ 
 package org.apache.http.impl.cookie;
 
-import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 
 public class BasicExpiresHandler extends AbstractCookieAttributeHandler {
@@ -46,7 +46,7 @@
         this.datepatterns = datepatterns;
     }
 
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicMaxAgeHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicMaxAgeHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicMaxAgeHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicMaxAgeHandler.java \
Sun Jul 22 11:19:49 2007 @@ -32,8 +32,8 @@
 
 import java.util.Date;
 
-import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class BasicMaxAgeHandler extends AbstractCookieAttributeHandler {
 
@@ -41,7 +41,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicPathHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicPathHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicPathHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicPathHandler.java \
Sun Jul 22 11:19:49 2007 @@ -34,6 +34,7 @@
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class BasicPathHandler implements CookieAttributeHandler {
 
@@ -41,7 +42,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, String value) 
+    public void parse(final SetCookie cookie, String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicSecureHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/BasicSecureHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicSecureHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/BasicSecureHandler.java \
Sun Jul 22 11:19:49 2007 @@ -33,6 +33,7 @@
 import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class BasicSecureHandler extends AbstractCookieAttributeHandler {
 
@@ -40,7 +41,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/CookieSpecBase.java \
Sun Jul 22 11:19:49 2007 @@ -39,6 +39,7 @@
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 /**
  * Cookie management functions shared by all specification.
@@ -78,7 +79,7 @@
                 throw new MalformedCookieException("Cookie name may not be empty");
             }
             
-            Cookie cookie = new BasicCookie(name, value);
+            SetCookie cookie = new BasicCookie(name, value);
             cookie.setPath(getDefaultPath(origin));
             cookie.setDomain(getDefaultDomain(origin));
             

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109DomainHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/RFC2109DomainHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109DomainHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109DomainHandler.java \
Sun Jul 22 11:19:49 2007 @@ -34,6 +34,7 @@
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class RFC2109DomainHandler implements CookieAttributeHandler {
 
@@ -41,7 +42,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109VersionHandler.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/main/java/org/apache/http/impl/cookie/RFC2109VersionHandler.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109VersionHandler.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/cookie/RFC2109VersionHandler.java \
Sun Jul 22 11:19:49 2007 @@ -33,6 +33,7 @@
 import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class RFC2109VersionHandler extends AbstractCookieAttributeHandler {
 
@@ -40,7 +41,7 @@
         super();
     }
     
-    public void parse(final Cookie cookie, final String value) 
+    public void parse(final SetCookie cookie, final String value) 
             throws MalformedCookieException {
         if (cookie == null) {
             throw new IllegalArgumentException("Cookie may not be null");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/cookie/TestCookiePathComparator.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/cookie/TestCookiePathComparator.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/cookie/TestCookiePathComparator.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/cookie/TestCookiePathComparator.java \
Sun Jul 22 11:19:49 2007 @@ -57,9 +57,9 @@
     }
 
     public void testUnequality1() {
-        Cookie cookie1 = new BasicCookie("name1", "value");
+        BasicCookie cookie1 = new BasicCookie("name1", "value");
         cookie1.setPath("/a/b/");
-        Cookie cookie2 = new BasicCookie("name1", "value");
+        BasicCookie cookie2 = new BasicCookie("name1", "value");
         cookie2.setPath("/a/");
         Comparator comparator = new CookiePathComparator();
         assertTrue(comparator.compare(cookie1, cookie2) < 0);
@@ -67,9 +67,9 @@
     }
 
     public void testUnequality2() {
-        Cookie cookie1 = new BasicCookie("name1", "value");
+        BasicCookie cookie1 = new BasicCookie("name1", "value");
         cookie1.setPath("/a/b");
-        Cookie cookie2 = new BasicCookie("name1", "value");
+        BasicCookie cookie2 = new BasicCookie("name1", "value");
         cookie2.setPath("/a");
         Comparator comparator = new CookiePathComparator();
         assertTrue(comparator.compare(cookie1, cookie2) < 0);
@@ -77,9 +77,9 @@
     }
 
     public void testEquality1() {
-        Cookie cookie1 = new BasicCookie("name1", "value");
+        BasicCookie cookie1 = new BasicCookie("name1", "value");
         cookie1.setPath("/a");
-        Cookie cookie2 = new BasicCookie("name1", "value");
+        BasicCookie cookie2 = new BasicCookie("name1", "value");
         cookie2.setPath("/a");
         Comparator comparator = new CookiePathComparator();
         assertTrue(comparator.compare(cookie1, cookie2) == 0);
@@ -87,9 +87,9 @@
     }
 
     public void testEquality2() {
-        Cookie cookie1 = new BasicCookie("name1", "value");
+        BasicCookie cookie1 = new BasicCookie("name1", "value");
         cookie1.setPath("/a/");
-        Cookie cookie2 = new BasicCookie("name1", "value");
+        BasicCookie cookie2 = new BasicCookie("name1", "value");
         cookie2.setPath("/a");
         Comparator comparator = new CookiePathComparator();
         assertTrue(comparator.compare(cookie1, cookie2) == 0);
@@ -97,9 +97,9 @@
     }
 
     public void testEquality3() {
-        Cookie cookie1 = new BasicCookie("name1", "value");
+        BasicCookie cookie1 = new BasicCookie("name1", "value");
         cookie1.setPath(null);
-        Cookie cookie2 = new BasicCookie("name1", "value");
+        BasicCookie cookie2 = new BasicCookie("name1", "value");
         cookie2.setPath("/");
         Comparator comparator = new CookiePathComparator();
         assertTrue(comparator.compare(cookie1, cookie2) == 0);
@@ -107,9 +107,9 @@
     }
 
     public void testEquality4() {
-        Cookie cookie1 = new BasicCookie("name1", "value");
+        BasicCookie cookie1 = new BasicCookie("name1", "value");
         cookie1.setPath("/this");
-        Cookie cookie2 = new BasicCookie("name1", "value");
+        BasicCookie cookie2 = new BasicCookie("name1", "value");
         cookie2.setPath("/that");
         Comparator comparator = new CookiePathComparator();
         assertTrue(comparator.compare(cookie1, cookie2) == 0);

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestAbstractCookieSpec.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestAbstractCookieSpec.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestAbstractCookieSpec.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestAbstractCookieSpec.java \
Sun Jul 22 11:19:49 2007 @@ -42,6 +42,7 @@
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
+import org.apache.http.cookie.SetCookie;
 
 public class TestAbstractCookieSpec extends TestCase {
 
@@ -84,7 +85,7 @@
             return true;
         }
 
-        public void parse(Cookie cookie, String value) throws \
MalformedCookieException { +        public void parse(SetCookie cookie, String value) \
throws MalformedCookieException {  }
 
         public void validate(Cookie cookie, CookieOrigin origin) throws \
MalformedCookieException {

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBasicCookieAttribHandlers.java \
Sun Jul 22 11:19:49 2007 @@ -39,7 +39,6 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
@@ -62,7 +61,7 @@
     }
 
     public void testBasicDomainParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicDomainHandler();
         h.parse(cookie, "www.somedomain.com");
         assertEquals("www.somedomain.com", cookie.getDomain());
@@ -70,7 +69,7 @@
     }
 
     public void testBasicDomainParseInvalid() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicDomainHandler();
         try {
             h.parse(cookie, "");
@@ -87,7 +86,7 @@
     }
 
     public void testBasicDomainValidate1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new BasicDomainHandler();
         
@@ -111,7 +110,7 @@
     }
 
     public void testBasicDomainValidate2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/", false); 
         CookieAttributeHandler h = new BasicDomainHandler();
         
@@ -128,7 +127,7 @@
     }
 
     public void testBasicDomainValidate3() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somedomain.com", 80, "/", false); 
         CookieAttributeHandler h = new BasicDomainHandler();
         
@@ -137,7 +136,7 @@
     }
 
     public void testBasicDomainValidate4() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somedomain.com", 80, "/", false); 
         CookieAttributeHandler h = new BasicDomainHandler();
         
@@ -151,7 +150,7 @@
     }
     
     public void testBasicDomainMatch1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somedomain.com", 80, "/", false); 
         CookieAttributeHandler h = new BasicDomainHandler();
 
@@ -163,7 +162,7 @@
     }
 
     public void testBasicDomainMatch2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new BasicDomainHandler();
 
@@ -212,7 +211,7 @@
     }
 
     public void testBasicPathParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicPathHandler();
         h.parse(cookie, "stuff");
         assertEquals("stuff", cookie.getPath());
@@ -226,7 +225,7 @@
     }
 
     public void testBasicPathMatch1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff", false); 
         CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff");
@@ -234,7 +233,7 @@
     }
     
     public void testBasicPathMatch2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff/", false); 
         CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff");
@@ -242,7 +241,7 @@
     }
     
     public void testBasicPathMatch3() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff/more-stuff", \
false);   CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff");
@@ -250,7 +249,7 @@
     }
     
     public void testBasicPathMatch4() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuffed", false); 
         CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff");
@@ -258,7 +257,7 @@
     }
 
     public void testBasicPathMatch5() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/otherstuff", \
false);   CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff");
@@ -266,7 +265,7 @@
     }
 
     public void testBasicPathMatch6() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff", false); 
         CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff/");
@@ -274,14 +273,14 @@
     }
 
     public void testBasicPathMatch7() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff", false); 
         CookieAttributeHandler h = new BasicPathHandler();
         assertTrue(h.match(cookie, origin));
     }
 
     public void testBasicPathValidate() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/stuff", false); 
         CookieAttributeHandler h = new BasicPathHandler();
         cookie.setPath("/stuff");
@@ -318,14 +317,14 @@
     }
 
     public void testBasicMaxAgeParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicMaxAgeHandler();
         h.parse(cookie, "2000");
         assertNotNull(cookie.getExpiryDate());
     }
 
     public void testBasicMaxAgeParseInvalid() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicMaxAgeHandler();
         try {
             h.parse(cookie, "garbage");
@@ -352,7 +351,7 @@
     }
 
     public void testBasicCommentParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicCommentHandler();
         h.parse(cookie, "whatever");
         assertEquals("whatever", cookie.getComment());
@@ -371,7 +370,7 @@
     }
     
     public void testBasicSecureParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicSecureHandler();
         h.parse(cookie, "whatever");
         assertTrue(cookie.isSecure());
@@ -380,7 +379,7 @@
     }
 
     public void testBasicSecureMatch() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieAttributeHandler h = new BasicSecureHandler();
 
         CookieOrigin origin1 = new CookieOrigin("somehost", 80, "/stuff", false); 
@@ -419,7 +418,7 @@
     }
 
     public void testBasicExpiresParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicExpiresHandler(new String[] \
{DateUtils.PATTERN_RFC1123});  
         DateFormat dateformat = new SimpleDateFormat(DateUtils.PATTERN_RFC1123, \
Locale.US); @@ -432,7 +431,7 @@
     }
     
     public void testBasicExpiresParseInvalid() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new BasicExpiresHandler(new String[] \
{DateUtils.PATTERN_RFC1123});  try {
             h.parse(cookie, "garbage");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBrowserCompatSpec.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestBrowserCompatSpec.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBrowserCompatSpec.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestBrowserCompatSpec.java \
Sun Jul 22 11:19:49 2007 @@ -658,7 +658,7 @@
      * browser compatibility mode.
      */
     public void testSecondDomainLevelCookie() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".sourceforge.net");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -670,7 +670,7 @@
     }
 
     public void testSecondDomainLevelCookieMatch1() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".sourceforge.net");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -682,7 +682,7 @@
     }
 
     public void testSecondDomainLevelCookieMatch2() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain("sourceforge.net");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -694,7 +694,7 @@
     }
 
     public void testSecondDomainLevelCookieMatch3() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".sourceforge.net");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -706,7 +706,7 @@
     }
          
     public void testInvalidSecondDomainLevelCookieMatch1() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".sourceforge.net");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -718,7 +718,7 @@
     }
 
     public void testInvalidSecondDomainLevelCookieMatch2() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain("sourceforge.net");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -731,7 +731,7 @@
 
     public void testMatchBlankPath() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin("host", 80, "  ", false);
@@ -740,7 +740,7 @@
 
     public void testMatchNullCookieDomain() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin("host", 80, "/", false);
         assertFalse(cookiespec.match(cookie, origin));
@@ -748,7 +748,7 @@
 
     public void testMatchNullCookiePath() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         CookieOrigin origin = new CookieOrigin("host", 80, "/", false);
         assertTrue(cookiespec.match(cookie, origin));
@@ -756,7 +756,7 @@
     
     public void testCookieMatch1() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin("host", 80, "/", false);
@@ -765,7 +765,7 @@
     
     public void testCookieMatch2() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain(".whatever.com");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin(".whatever.com", 80, "/", false);
@@ -774,7 +774,7 @@
     
     public void testCookieMatch3() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain(".whatever.com");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin(".really.whatever.com", 80, "/", \
false); @@ -783,7 +783,7 @@
     
     public void testCookieMatch4() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin("host", 80, "/foobar", false);
@@ -792,7 +792,7 @@
     
     public void testCookieMismatch1() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host1");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin("host2", 80, "/", false);
@@ -801,7 +801,7 @@
     
     public void testCookieMismatch2() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain(".aaaaaaaaa.com");
         cookie.setPath("/");
         CookieOrigin origin = new CookieOrigin(".bbbbbbbb.com", 80, "/", false);
@@ -810,7 +810,7 @@
     
     public void testCookieMismatch3() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/foobar");
         CookieOrigin origin = new CookieOrigin("host", 80, "/foo", false);
@@ -819,7 +819,7 @@
     
     public void testCookieMismatch4() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/foobar");
         CookieOrigin origin = new CookieOrigin("host", 80, "/foobar/", false);
@@ -828,7 +828,7 @@
     
     public void testCookieMatch5() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/foobar/r");
         CookieOrigin origin = new CookieOrigin("host", 80, "/foobar/", false);
@@ -837,7 +837,7 @@
     
     public void testCookieMismatch6() throws Exception {
         CookieSpec cookiespec = new BrowserCompatSpec();
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         cookie.setDomain("host");
         cookie.setPath("/foobar");
         cookie.setSecure(true);
@@ -846,7 +846,7 @@
     }
     
     public void testInvalidMatchDomain() throws Exception {
-        Cookie cookie = new BasicCookie("name", null); 
+        BasicCookie cookie = new BasicCookie("name", null); 
         cookie.setDomain("beta.gamma.com");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
@@ -878,7 +878,7 @@
      * Tests if null cookie values are handled correctly.
      */
     public void testNullCookieValueFormatting() {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".whatever.com");
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieNetscapeDraft.java \
Sun Jul 22 11:19:49 2007 @@ -209,7 +209,7 @@
     }
  
     public void testFormatCookies() throws Exception {
-        Cookie c1 = new BasicCookie("name1", "value1");
+        BasicCookie c1 = new BasicCookie("name1", "value1");
         c1.setDomain(".whatever.com");
         c1.setDomainAttributeSpecified(true);
         c1.setPath("/");

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java \
Sun Jul 22 11:19:49 2007 @@ -169,7 +169,7 @@
      * browser compatibility mode.
      */
     public void testSecondDomainLevelCookie() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".sourceforge.net");
         cookie.setPath("/");
         cookie.setDomainAttributeSpecified(true);
@@ -186,7 +186,7 @@
     }    
 
     public void testSecondDomainLevelCookieMatch() throws Exception {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".sourceforge.net");
         cookie.setPath("/");
         cookie.setDomainAttributeSpecified(true);
@@ -361,7 +361,7 @@
      * Tests if null cookie values are handled correctly.
      */
     public void testNullCookieValueFormatting() {
-        Cookie cookie = new BasicCookie("name", null);
+        BasicCookie cookie = new BasicCookie("name", null);
         cookie.setDomain(".whatever.com");
         cookie.setPath("/");
         cookie.setDomainAttributeSpecified(true);
@@ -383,7 +383,7 @@
     }
 
     public void testCookieNullDomainNullPathFormatting() {
-        Cookie cookie = new BasicCookie("name", null); 
+        BasicCookie cookie = new BasicCookie("name", null); 
         cookie.setDomainAttributeSpecified(true);
         cookie.setPath("/");
         cookie.setPathAttributeSpecified(true);
@@ -403,16 +403,16 @@
     }
 
     public void testCookieOrderingByPath() {
-        Cookie c1 = new BasicCookie("name1", "value1");
+        BasicCookie c1 = new BasicCookie("name1", "value1");
         c1.setPath("/a/b/c");
         c1.setPathAttributeSpecified(true);
-        Cookie c2 = new BasicCookie("name2", "value2");
+        BasicCookie c2 = new BasicCookie("name2", "value2");
         c2.setPath("/a/b");
         c2.setPathAttributeSpecified(true);
-        Cookie c3 = new BasicCookie("name3", "value3");
+        BasicCookie c3 = new BasicCookie("name3", "value3");
         c3.setPath("/a");
         c3.setPathAttributeSpecified(true);
-        Cookie c4 = new BasicCookie("name4", "value4");
+        BasicCookie c4 = new BasicCookie("name4", "value4");
         c4.setPath("/");
         c4.setPathAttributeSpecified(true);
 

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestNetscapeCookieAttribHandlers.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestNetscapeCookieAttribHandlers.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestNetscapeCookieAttribHandlers.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestNetscapeCookieAttribHandlers.java \
Sun Jul 22 11:19:49 2007 @@ -34,7 +34,6 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
@@ -56,7 +55,7 @@
     }
 
     public void testNetscapeDomainValidate1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/", false); 
         CookieAttributeHandler h = new NetscapeDomainHandler();
         
@@ -73,7 +72,7 @@
     }
 
     public void testNetscapeDomainValidate2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new NetscapeDomainHandler();
         
@@ -97,7 +96,7 @@
     }
 
     public void testNetscapeDomainValidate3() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.a.com", 80, "/", false); 
         CookieAttributeHandler h = new NetscapeDomainHandler();
         
@@ -114,7 +113,7 @@
     }
 
     public void testNetscapeDomainValidate4() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.a.b.c", 80, "/", false); 
         CookieAttributeHandler h = new NetscapeDomainHandler();
         
@@ -131,7 +130,7 @@
     }
     
     public void testNetscapeDomainMatch1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new NetscapeDomainHandler();
 
@@ -143,7 +142,7 @@
     }
 
     public void testNetscapeDomainMatch2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.whatever.somedomain.com", 80, \
"/", false);   CookieAttributeHandler h = new NetscapeDomainHandler();
 

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestRFC2109CookieAttribHandlers.java
                
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-clien \
t/src/test/java/org/apache/http/impl/cookie/TestRFC2109CookieAttribHandlers.java?view=diff&rev=558519&r1=558518&r2=558519
 ==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestRFC2109CookieAttribHandlers.java \
                (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestRFC2109CookieAttribHandlers.java \
Sun Jul 22 11:19:49 2007 @@ -34,7 +34,6 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
 import org.apache.http.cookie.MalformedCookieException;
@@ -56,7 +55,7 @@
     }
 
     public void testRFC2109DomainParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new RFC2109DomainHandler();
         
         h.parse(cookie, "somehost");
@@ -77,7 +76,7 @@
     }
 
     public void testRFC2109DomainValidate1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somehost", 80, "/", false); 
         CookieAttributeHandler h = new RFC2109DomainHandler();
         
@@ -101,7 +100,7 @@
     }
 
     public void testRFC2109DomainValidate2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new RFC2109DomainHandler();
         
@@ -125,7 +124,7 @@
     }
 
     public void testRFC2109DomainValidate3() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.a.com", 80, "/", false); 
         CookieAttributeHandler h = new RFC2109DomainHandler();
         
@@ -142,7 +141,7 @@
     }
 
     public void testRFC2109DomainValidate4() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.a.b.c", 80, "/", false); 
         CookieAttributeHandler h = new RFC2109DomainHandler();
         
@@ -166,7 +165,7 @@
     }
     
     public void testRFC2109DomainMatch1() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new RFC2109DomainHandler();
 
@@ -178,7 +177,7 @@
     }
 
     public void testRFC2109DomainMatch2() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.whatever.somedomain.com", 80, \
"/", false);   CookieAttributeHandler h = new RFC2109DomainHandler();
 
@@ -187,7 +186,7 @@
     }
 
     public void testRFC2109DomainMatch3() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("somedomain.com", 80, "/", false); 
         CookieAttributeHandler h = new RFC2109DomainHandler();
 
@@ -196,7 +195,7 @@
     }
 
     public void testRFC2109DomainMatch4() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieOrigin origin = new CookieOrigin("www.somedomain.com", 80, "/", \
false);   CookieAttributeHandler h = new RFC2109DomainHandler();
 
@@ -239,14 +238,14 @@
     }
  
     public void testRFC2109VersionParse() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new RFC2109VersionHandler();
         h.parse(cookie, "12");
         assertEquals(12, cookie.getVersion());
     }
 
     public void testRFC2109VersionParseInvalid() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value"); 
+        BasicCookie cookie = new BasicCookie("name", "value"); 
         CookieAttributeHandler h = new RFC2109VersionHandler();
         try {
             h.parse(cookie, "garbage");
@@ -269,7 +268,7 @@
     }
 
     public void testRFC2109VersionValidate() throws Exception {
-        Cookie cookie = new BasicCookie("name", "value");
+        BasicCookie cookie = new BasicCookie("name", "value");
         CookieOrigin origin = new CookieOrigin("somedomain.com", 80, "/", false); 
         CookieAttributeHandler h = new RFC2109VersionHandler();
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic