Skip to content

Commit 3010b3e

Browse files
committed
("Remove Potential Quote from Max Age, before parsing as int in parseCookie") Patch provided by Dominic Tootell
1 parent 1b92fd3 commit 3010b3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public static Cookie parseCookie(String value) {
418418
// favor 'max-age' field over 'expires'
419419
if (!maxAgeSet && "max-age".equalsIgnoreCase(f[0])) {
420420
try {
421-
maxAge = Integer.valueOf(f[1]);
421+
maxAge = Integer.valueOf(removeQuote(f[1]));
422422
}
423423
catch (NumberFormatException e1) {
424424
// ignore failure to parse -> treat as session cookie

0 commit comments

Comments
 (0)