Ignore:
Timestamp:
2017-10-14T00:09:56+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15435 - do not cache incorrect login credentials when using basic auth

File:
1 edited

Legend:

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

    r12711 r12992  
    66import java.io.IOException;
    77import java.io.InputStream;
     8import java.net.Authenticator.RequestorType;
    89import java.net.HttpURLConnection;
    910import java.net.MalformedURLException;
     
    195196            }
    196197            try {
    197                 if (response.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
     198                if (response.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED) {
     199                    CredentialsManager.getInstance().purgeCredentialsCache(RequestorType.SERVER);
    198200                    throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED, null, null);
     201                }
    199202
    200203                if (response.getResponseCode() == HttpURLConnection.HTTP_PROXY_AUTH)
Note: See TracChangeset for help on using the changeset viewer.