hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1620613 - in /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie: BestMatchSpec.java RFC2965Spec.java
Date Tue, 26 Aug 2014 14:38:28 GMT
Author: olegk
Date: Tue Aug 26 14:38:28 2014
New Revision: 1620613

URL: http://svn.apache.org/r1620613
Log:
Default cookie spec to permit 'expires' attribute for Netscape style cookies only

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java?rev=1620613&r1=1620612&r2=1620613&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpec.java
Tue Aug 26 14:38:28 2014
@@ -58,8 +58,23 @@ public class BestMatchSpec implements Co
 
     public BestMatchSpec(final String[] datepatterns, final boolean oneHeader) {
         super();
-        this.strict = new RFC2965Spec(datepatterns, oneHeader);
-        this.obsoleteStrict = new RFC2109Spec(datepatterns, oneHeader);
+        this.strict = new RFC2965Spec(oneHeader,
+                new RFC2965VersionAttributeHandler(),
+                new BasicPathHandler(),
+                new RFC2965DomainAttributeHandler(),
+                new RFC2965PortAttributeHandler(),
+                new BasicMaxAgeHandler(),
+                new BasicSecureHandler(),
+                new BasicCommentHandler(),
+                new RFC2965CommentUrlAttributeHandler(),
+                new RFC2965DiscardAttributeHandler());
+        this.obsoleteStrict = new RFC2109Spec(oneHeader,
+                new RFC2109VersionHandler(),
+                new BasicPathHandler(),
+                new RFC2109DomainHandler(),
+                new BasicMaxAgeHandler(),
+                new BasicSecureHandler(),
+                new BasicCommentHandler());
         this.netscapeDraft = new NetscapeDraftSpec(
                 new BasicDomainHandler(),
                 new BasicPathHandler(),

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java?rev=1620613&r1=1620612&r2=1620613&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965Spec.java
Tue Aug 26 14:38:28 2014
@@ -37,6 +37,7 @@ import org.apache.http.HeaderElement;
 import org.apache.http.NameValuePair;
 import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.cookie.ClientCookie;
+import org.apache.http.cookie.CommonCookieAttributeHandler;
 import org.apache.http.cookie.Cookie;
 import org.apache.http.cookie.CookieAttributeHandler;
 import org.apache.http.cookie.CookieOrigin;
@@ -77,6 +78,11 @@ public class RFC2965Spec extends RFC2109
                 new RFC2965DiscardAttributeHandler());
     }
 
+    RFC2965Spec(final boolean oneHeader,
+                final CommonCookieAttributeHandler... handlers) {
+        super(oneHeader, handlers);
+    }
+
     @Override
     public List<Cookie> parse(
             final Header header,



Mime
View raw message