Changeset 10686 in josm for trunk


Ignore:
Timestamp:
2016-07-31T13:18:01+02:00 (8 years ago)
Author:
Don-vip
Message:

do not cache 404 results of HTTP requests (not found)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r10627 r10686  
    482482                        Arrays.asList(Long.toString(System.currentTimeMillis()), localPathEntry.get(1)));
    483483                return localFile;
     484            } else if (con.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
     485                throw new IOException(tr("The requested URL {0} was not found", urlStr));
    484486            }
    485487            try (InputStream bis = new BufferedInputStream(con.getContent())) {
Note: See TracChangeset for help on using the changeset viewer.