Changeset 5587 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2012-11-18T00:44:10+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r5266 r5587 119 119 URL url = new URL(pi.downloadlink); 120 120 synchronized(this) { 121 downloadConnection = (HttpURLConnection)url.openConnection();121 downloadConnection = Utils.openHttpConnection(url); 122 122 downloadConnection.setRequestProperty("Cache-Control", "no-cache"); 123 downloadConnection.setRequestProperty("User-Agent",Version.getInstance().getAgentString());124 downloadConnection.setRequestProperty("Host", url.getHost());125 123 downloadConnection.connect(); 126 124 } -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r5266 r5587 162 162 URL url = new URL(site); 163 163 synchronized(this) { 164 connection = (HttpURLConnection)url.openConnection();164 connection = Utils.openHttpConnection(url); 165 165 connection.setRequestProperty("Cache-Control", "no-cache"); 166 connection.setRequestProperty("User-Agent",Version.getInstance().getAgentString());167 connection.setRequestProperty("Host", url.getHost());168 166 connection.setRequestProperty("Accept-Charset", "utf-8"); 169 167 } … … 211 209 URL url = new URL(site); 212 210 synchronized(this) { 213 connection = (HttpURLConnection)url.openConnection();211 connection = Utils.openHttpConnection(url); 214 212 connection.setRequestProperty("Cache-Control", "no-cache"); 215 connection.setRequestProperty("User-Agent",Version.getInstance().getAgentString());216 connection.setRequestProperty("Host", url.getHost());217 213 } 218 214 in = connection.getInputStream();
Note:
See TracChangeset
for help on using the changeset viewer.