Changeset 9274 in josm for trunk/src/org/openstreetmap/josm/tools/HttpClient.java
- Timestamp:
- 2016-01-03T12:13:44+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r9255 r9274 13 13 import java.net.URL; 14 14 import java.util.List; 15 import java.util.Locale; 15 16 import java.util.Map; 16 17 import java.util.Scanner; … … 99 100 100 101 if ("PUT".equals(requestMethod) || "POST".equals(requestMethod) || "DELETE".equals(requestMethod)) { 101 Main.info("{0} {1} ({2} kB) ...", requestMethod, url, requestBody.length / 1024);102 Main.info("{0} {1} ({2}) ...", requestMethod, url, Utils.getSizeString(requestBody.length, Locale.getDefault())); 102 103 headers.put("Content-Length", String.valueOf(requestBody.length)); 103 104 connection.setDoOutput(true); … … 116 117 requestMethod, url, hasReason ? " (" + reasonForRequest + ")" : "", 117 118 connection.getResponseCode(), 118 connection.getContentLengthLong() > 0 ? " (" + connection.getContentLengthLong() / 1024 + "KB)" : "" 119 connection.getContentLengthLong() > 0 120 ? " (" + Utils.getSizeString(connection.getContentLengthLong(), Locale.getDefault()) + ")" 121 : "" 119 122 ); 120 123 if (Main.isDebugEnabled()) {
Note:
See TracChangeset
for help on using the changeset viewer.