Changeset 14216 in josm
- Timestamp:
- 2018-09-01T16:40:32+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java
r13572 r14216 200 200 return null; 201 201 progressMonitor.subTask(tr("Downloading OSM data...")); 202 return OsmReader.parseDataSet(compression.getUncompressedInputStream(in), progressMonitor.createSubTaskMonitor(1, false)); 202 InputStream uncompressedInputStream = compression.getUncompressedInputStream(in); 203 ProgressMonitor subTaskMonitor = progressMonitor.createSubTaskMonitor(1, false); 204 if ("application/json".equals(contentType)) { 205 return OsmJsonReader.parseDataSet(uncompressedInputStream, subTaskMonitor); 206 } else { 207 return OsmReader.parseDataSet(uncompressedInputStream, subTaskMonitor); 208 } 203 209 } 204 210 } -
trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
r14119 r14216 43 43 private boolean doAuthenticate; 44 44 protected boolean gpxParsedProperly; 45 protected String contentType; 45 46 46 47 /** … … 190 191 try { 191 192 response = client.connect(progressMonitor); 193 contentType = response.getContentType(); 192 194 } catch (IOException e) { 193 195 Logging.error(e); … … 210 212 String errorBody = fetchResponseText(response); 211 213 throw new OsmApiException(response.getResponseCode(), errorHeader, errorBody, url.toString(), null, 212 response.getContentType());214 contentType); 213 215 } 214 216
Note:
See TracChangeset
for help on using the changeset viewer.