Ignore:
Timestamp:
2026-11-20T11:19:57+01:00 (63 minutes ago)
Author:
stoecker
Message:

improve tile caching, patch by wangi, see #25044

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r19533 r19693  
    352352            final HttpClient request = getRequest("GET");
    353353
    354             if (isObjectLoadable() &&
     354            // If-Modified-Since only without an ETag: servers which evaluate both (e.g. Apache serving tiles without a
     355            // Last-Modified) answer 200 to our download time even when the ETag matches, see RFC 9110 section 13.1.3
     356            if (isObjectLoadable() && attributes.getEtag() != null) {
     357                request.setHeader("If-None-Match", attributes.getEtag());
     358            } else if (isObjectLoadable() &&
    355359                    (now - attributes.getLastModification()) <= ABSOLUTE_EXPIRE_TIME_LIMIT) {
    356360                request.setIfModifiedSince(attributes.getLastModification());
    357             }
    358             if (isObjectLoadable() && attributes.getEtag() != null) {
    359                 request.setHeader("If-None-Match", attributes.getEtag());
    360361            }
    361362
Note: See TracChangeset for help on using the changeset viewer.