Ignore:
Timestamp:
2017-08-23T00:34:13+02:00 (7 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/DownloadSVGTask.java

    r33047 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.data.osm.Way;
    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;
     33
    3634/**
    3735 * Grab the SVG administrative boundaries of the active commune layer (cadastre),
     
    193191
    194192    private String grabSVG(URL url) throws IOException, OsmTransferException {
    195         wmsInterface.urlConn = (HttpURLConnection) url.openConnection();
    196         wmsInterface.urlConn.setRequestProperty("Connection", "close");
    197         wmsInterface.urlConn.setRequestMethod("GET");
    198         wmsInterface.setCookie();
    199193        File file = new File(CadastrePlugin.cacheDir + "boundary.svg");
    200194        String svg = "";
    201         try (InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE)) {
     195        try (InputStream is = wmsInterface.getContent(url)) {
    202196            if (file.exists())
    203197                file.delete();
Note: See TracChangeset for help on using the changeset viewer.