Changeset 35062 in osm for applications/editors/josm


Ignore:
Timestamp:
2019-07-10T00:08:50+02:00 (5 years ago)
Author:
donvip
Message:

fix #josm17907 - fix parsing of Last-Modified header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Client.java

    r35060 r35062  
    179179        @Override
    180180        public long getLastModified() {
    181             return response.headers().firstValueAsLong("Last-Modified").orElse(0L);
     181            return response.headers().firstValue("Last-Modified")
     182                    .map(DateTimeFormatter.RFC_1123_DATE_TIME::parse)
     183                    .map(t -> 1000L * t.getLong(ChronoField.INSTANT_SECONDS))
     184                    .orElse(0L);
    182185        }
    183186
Note: See TracChangeset for help on using the changeset viewer.