Changeset 6073 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2013-07-19T01:41:40+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
r5926 r6073 259 259 * <p> 260 260 * This can causes problems when downloading from certain GitHub URLs. 261 * 262 * @param downloadUrl The resource URL to download 263 * @return The HTTP connection effectively linked to the resource, after all potential redirections 264 * @throws MalformedURLException If a redirected URL is wrong 265 * @throws IOException If any I/O operation goes wrong 266 * @since 6073 261 267 */ 262 p rotectedHttpURLConnection connectFollowingRedirect(URL downloadUrl) throws MalformedURLException, IOException {268 public static HttpURLConnection connectFollowingRedirect(URL downloadUrl) throws MalformedURLException, IOException { 263 269 HttpURLConnection con = null; 264 270 int numRedirects = 0; -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r6048 r6073 22 22 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 23 23 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 24 import org.openstreetmap.josm.io.MirroredInputStream; 24 25 import org.openstreetmap.josm.tools.CheckParameterUtil; 25 26 import org.openstreetmap.josm.tools.Utils; … … 119 120 URL url = new URL(pi.downloadlink); 120 121 synchronized(this) { 121 downloadConnection = Utils.openHttpConnection(url); 122 downloadConnection.setRequestProperty("Cache-Control", "no-cache"); 123 downloadConnection.connect(); 122 downloadConnection = MirroredInputStream.connectFollowingRedirect(url); 124 123 } 125 124 in = downloadConnection.getInputStream();
Note:
See TracChangeset
for help on using the changeset viewer.