Changeset 2748 in josm for trunk/src/org/openstreetmap/josm/io/OsmApi.java
- Timestamp:
- 2010-01-06T20:35:56+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r2734 r2748 466 466 } 467 467 468 protected boolean isUsingOAuth() { 469 String authMethod = Main.pref.get("osm-server.auth-method", "basic"); 470 return authMethod.equals("oauth"); 471 } 472 468 473 private String sendRequest(String requestMethod, String urlSuffix,String requestBody, ProgressMonitor monitor) throws OsmTransferException { 469 474 return sendRequest(requestMethod, urlSuffix, requestBody, monitor, true); … … 574 579 case HttpURLConnection.HTTP_GONE: 575 580 throw new OsmApiPrimitiveGoneException(errorHeader, errorBody); 576 case HttpURLConnection.HTTP_UNAUTHORIZED:577 case HttpURLConnection.HTTP_PROXY_AUTH:578 // if we get here with HTTP_UNAUTHORIZED or HTTP_PROXY_AUTH the user canceled the579 // username/password dialog. Throw an OsmTransferCancelledException.580 // 581 throw new OsmTransferCancelledException();581 // case HttpURLConnection.HTTP_UNAUTHORIZED: 582 // throw new OsmApiException(retCode, errorHeader, errorBody); 583 // case HttpURLConnection.HTTP_PROXY_AUTH: 584 // throw new OsmApiException(retCode, errorHeader, errorBody); 585 // case HttpURLConnection.HTTP_FORBIDDEN: 586 // throw new OsmApiException(retCode, errorHeader, errorBody); 582 587 case HttpURLConnection.HTTP_CONFLICT: 583 588 if (ChangesetClosedException.errorHeaderMatchesPattern(errorHeader)) … … 585 590 else 586 591 throw new OsmApiException(retCode, errorHeader, errorBody); 592 case HttpURLConnection.HTTP_FORBIDDEN: 593 OsmApiException e = new OsmApiException(retCode, errorHeader, errorBody); 594 e.setAccessedUrl(activeConnection.getURL().toString()); 595 throw e; 587 596 default: 588 597 throw new OsmApiException(retCode, errorHeader, errorBody);
Note:
See TracChangeset
for help on using the changeset viewer.