Ignore:
Timestamp:
2016-01-10T20:09:16+01:00 (4 years ago)
Author:
simon04
Message:

fix #7122 - Improve HTTP authentication for parallel requests (TMS/WMS imagery)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/HttpClient.java

    r9314 r9396  
    2929import org.openstreetmap.josm.io.ProgressOutputStream;
    3030import org.openstreetmap.josm.io.UTFInputStreamReader;
     31import org.openstreetmap.josm.io.auth.DefaultAuthenticator;
    3132
    3233/**
     
    122123                if (Main.isDebugEnabled()) {
    123124                    Main.debug("RESPONSE: " + connection.getHeaderFields());
     125                }
     126                if (DefaultAuthenticator.getInstance().isEnabled() && connection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
     127                    DefaultAuthenticator.getInstance().addFailedCredentialHost(url.getHost());
    124128                }
    125129            } catch (IOException e) {
Note: See TracChangeset for help on using the changeset viewer.