Ignore:
Timestamp:
2017-08-23T00:34:13+02:00 (9 years ago)
Author:
donvip
Message:

fix #josm15178 - use new HTTPS links from French cadastre - requires JOSM 12623+ to load Certigna certificate from platform keystore (not included in JRE keystore)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java

    r32556 r33514  
    1111import java.io.InputStream;
    1212import java.io.InputStreamReader;
    13 import java.net.HttpURLConnection;
    1413import java.net.MalformedURLException;
    1514import java.net.URL;
     
    3130import org.openstreetmap.josm.gui.MapView;
    3231import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    33 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    3432import org.openstreetmap.josm.io.OsmTransferException;
    35 import org.openstreetmap.josm.io.ProgressInputStream;
    3633
    3734public class DownloadSVGBuilding extends PleaseWaitRunnable {
     
    243240
    244241    private String grabSVG(URL url) throws IOException, OsmTransferException {
    245         wmsInterface.urlConn = (HttpURLConnection) url.openConnection();
    246         wmsInterface.urlConn.setRequestProperty("Connection", "close");
    247         wmsInterface.urlConn.setRequestMethod("GET");
    248         wmsInterface.setCookie();
    249242        File file = new File(CadastrePlugin.cacheDir + "building.svg");
    250243        String svg = "";
    251         try (InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE)) {
     244        try (InputStream is = wmsInterface.getContent(url)) {
    252245            if (file.exists())
    253246                file.delete();
Note: See TracChangeset for help on using the changeset viewer.