Ignore:
Timestamp:
2013-07-19T01:41:40+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #8886 - Allow to download plugin jars redirected from https to http, like those hosted on github

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r6048 r6073  
    2222import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2323import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     24import org.openstreetmap.josm.io.MirroredInputStream;
    2425import org.openstreetmap.josm.tools.CheckParameterUtil;
    2526import org.openstreetmap.josm.tools.Utils;
     
    119120            URL url = new URL(pi.downloadlink);
    120121            synchronized(this) {
    121                 downloadConnection = Utils.openHttpConnection(url);
    122                 downloadConnection.setRequestProperty("Cache-Control", "no-cache");
    123                 downloadConnection.connect();
     122                downloadConnection = MirroredInputStream.connectFollowingRedirect(url);
    124123            }
    125124            in = downloadConnection.getInputStream();
Note: See TracChangeset for help on using the changeset viewer.