Subject: [PATCH] 4145
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/io/OsmApi.java b/src/org/openstreetmap/josm/io/OsmApi.java
|
a
|
b
|
|
| 761 | 761 | protected final String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor, |
| 762 | 762 | String contentType, boolean doAuthenticate, boolean fastFail) throws OsmTransferException { |
| 763 | 763 | int retries = fastFail ? 0 : getMaxRetries(); |
| | 764 | if (monitor == null) { |
| | 765 | monitor = NullProgressMonitor.INSTANCE; |
| | 766 | } |
| 764 | 767 | |
| 765 | 768 | while (true) { // the retry loop |
| 766 | 769 | try { |
| 767 | 770 | url = new URL(new URL(getBaseUrl()), urlSuffix); |
| 768 | 771 | final HttpClient client = HttpClient.create(url, requestMethod) |
| 769 | 772 | .keepAlive(false) |
| 770 | | .setAccept("application/xml, */*;q=0.8"); |
| | 773 | .setAccept("application/xml, */*;q=0.8") |
| | 774 | .setFinishOnCloseOutput(false); |
| 771 | 775 | activeConnection = client; |
| 772 | 776 | if (fastFail) { |
| 773 | 777 | client.setConnectTimeout(1000); |
| … |
… |
|
| 791 | 795 | client.setRequestBody((requestBody != null ? requestBody : "").getBytes(StandardCharsets.UTF_8)); |
| 792 | 796 | } |
| 793 | 797 | |
| 794 | | final HttpClient.Response response = client.connect(); |
| | 798 | final HttpClient.Response response = client.connect(monitor.createSubTaskMonitor(1, false)); |
| 795 | 799 | Logging.info(response.getResponseMessage()); |
| 796 | 800 | int retCode = response.getResponseCode(); |
| 797 | 801 | |