Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 9180)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 9182)
@@ -619,5 +619,9 @@
                 final HttpClient client = HttpClient.create(url, requestMethod).keepAlive(false);
                 if (fastFail) {
+                    client.setConnectTimeout(1000);
                     client.setReadTimeout(1000);
+                } else {
+                    // use default connect timeout from org.openstreetmap.josm.tools.HttpClient.connectTimeout
+                    client.setReadTimeout(0);
                 }
                 if (doAuthenticate) {
@@ -626,4 +630,5 @@
 
                 if ("PUT".equals(requestMethod) || "POST".equals(requestMethod) || "DELETE".equals(requestMethod)) {
+                    client.setHeader("Content-Type", "text/xml");
                     // It seems that certain bits of the Ruby API are very unhappy upon
                     // receipt of a PUT/POST message without a Content-length header,
@@ -632,5 +637,5 @@
                     // we use the output stream, we create an output stream for PUT/POST
                     // even if there is no payload.
-                    client.setRequestBody(requestBody.getBytes(StandardCharsets.UTF_8));
+                    client.setRequestBody((requestBody != null ? requestBody : "").getBytes(StandardCharsets.UTF_8));
                 }
 
Index: trunk/src/org/openstreetmap/josm/tools/HttpClient.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 9180)
+++ trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 9182)
@@ -92,4 +92,5 @@
 
         if ("PUT".equals(requestMethod) || "POST".equals(requestMethod) || "DELETE".equals(requestMethod)) {
+            Main.info("{0} {1} ({2} kB) ...", requestMethod, url, requestBody.length / 1024);
             headers.put("Content-Length", String.valueOf(requestBody.length));
             connection.setDoOutput(true);
@@ -112,4 +113,5 @@
                 }
             } catch (IOException e) {
+                Main.warn(e);
                 //noinspection ThrowableResultOfMethodCallIgnored
                 Main.addNetworkError(url, Utils.getRootCause(e));
