You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2020/04/16 17:55:33 UTC

[GitHub] [httpcomponents-client] ok2c commented on a change in pull request #222: HTTPCLIENT-2076: fix NPE in LaxExpiresHandler and ignore invalid Expires / MaxAge

ok2c commented on a change in pull request #222: HTTPCLIENT-2076: fix NPE in LaxExpiresHandler and ignore invalid Expires / MaxAge
URL: https://github.com/apache/httpcomponents-client/pull/222#discussion_r409742770
 
 

 ##########
 File path: httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/BasicMaxAgeHandler.java
 ##########
 @@ -53,18 +53,16 @@ public void parse(final SetCookie cookie, final String value)
             throws MalformedCookieException {
         Args.notNull(cookie, "Cookie");
         if (value == null) {
-            throw new MalformedCookieException("Missing value for 'max-age' attribute");
+            return;
         }
         final int age;
         try {
             age = Integer.parseInt(value);
         } catch (final NumberFormatException e) {
-            throw new MalformedCookieException ("Invalid 'max-age' attribute: "
 
 Review comment:
   @heejeongkim Why do you want to quietly ignore malformed `max-age` and `expires` attributes with strict RFC 6265 policy? That does not look right to me.   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org