Skip to content

Commit d01fdeb

Browse files
committed
More work on AHC 88
1 parent 65e3bd9 commit d01fdeb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ protected SimpleDateFormat[] initialValue() {
5151

5252
return new SimpleDateFormat[]
5353
{
54+
new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy", Locale.US), //ASCTIME
55+
new SimpleDateFormat("EEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US), //RFC1036
5456
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US),
5557
new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z", Locale.US),
5658
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US),
5759
new SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss Z", Locale.US),
58-
new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy", Locale.US), //ASCTIME
59-
new SimpleDateFormat("EEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US), //RFC1036
6060
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US) // RFC1123
61+
6162
};
6263
}
6364
};
@@ -459,7 +460,7 @@ private static int convertExpireField(String timestring) throws Exception {
459460
for (SimpleDateFormat sdf : simpleDateFormat.get()) {
460461
try {
461462
long expire = sdf.parse(removeQuote(timestring.trim())).getTime();
462-
return (int) (expire - System.currentTimeMillis()) / 1000;
463+
return (int) ((expire - System.currentTimeMillis()) / 1000);
463464
} catch (ParseException e) {
464465
exception = e;
465466
} catch (NumberFormatException e) {

0 commit comments

Comments
 (0)