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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]