Update codec-http/src/main/java/io/netty/handler/codec/http/DefaultCookie.java
Allow to set a negative value for maxAge of DefaultCookie. See #533
This commit is contained in:
parent
2bb114bcb7
commit
e80abf0b39
@ -199,11 +199,6 @@ public class DefaultCookie implements Cookie {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setMaxAge(long maxAge) {
|
public void setMaxAge(long maxAge) {
|
||||||
if (maxAge < -1) {
|
|
||||||
throw new IllegalArgumentException(
|
|
||||||
"maxAge must be either -1, 0, or a positive integer: " +
|
|
||||||
maxAge);
|
|
||||||
}
|
|
||||||
this.maxAge = maxAge;
|
this.maxAge = maxAge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user