Index: trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java	(revision 16836)
+++ trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java	(revision 16837)
@@ -36,5 +36,5 @@
 
 /**
- * Tests the {@link HttpClient} using the webservice <a href="https://httpbin.org/">https://httpbin.org/</a>.
+ * Tests the {@link HttpClient} using the webservice <a href="https://httpbingo.org/">https://httpbingo.org/</a>.
  */
 public class HttpClientTest {
@@ -83,6 +83,6 @@
     @Test
     public void testConstructorGetterSetter() throws IOException {
-        final HttpClient client = HttpClient.create(new URL("https://httpbin.org/"));
-        assertThat(client.getURL(), is(new URL("https://httpbin.org/")));
+        final HttpClient client = HttpClient.create(new URL("https://httpbingo.org/"));
+        assertThat(client.getURL(), is(new URL("https://httpbingo.org/")));
         assertThat(client.getRequestMethod(), is("GET"));
         assertThat(client.getRequestHeader("Accept"), is("*/*"));
@@ -104,18 +104,18 @@
     @Test
     public void testGet() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/get?foo=bar")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/get?foo=bar")).connect(progress);
         assertThat(response.getRequestMethod(), is("GET"));
         assertThat(response.getResponseCode(), is(200));
         assertThat(response.getResponseMessage(), equalToIgnoringCase("OK"));
-        assertThat(response.getContentType(), is("application/json"));
-        assertThat(response.getHeaderField("Content-Type"), is("application/json"));
-        assertThat(response.getHeaderField("Content-TYPE"), is("application/json"));
-        assertThat(response.getHeaderFields().get("Content-Type"), is(Collections.singletonList("application/json")));
-        assertThat(response.getHeaderFields().get("Content-TYPE"), is(Collections.singletonList("application/json")));
+        assertThat(response.getContentType(), is("application/json; encoding=utf-8"));
+        assertThat(response.getHeaderField("Content-Type"), is("application/json; encoding=utf-8"));
+        assertThat(response.getHeaderField("Content-TYPE"), is("application/json; encoding=utf-8"));
+        assertThat(response.getHeaderFields().get("Content-Type"), is(Collections.singletonList("application/json; encoding=utf-8")));
+        assertThat(response.getHeaderFields().get("Content-TYPE"), is(Collections.singletonList("application/json; encoding=utf-8")));
         try (InputStream in = response.getContent();
              JsonReader json = JsonProvider.provider().createReader(in)) {
             final JsonObject root = json.readObject();
-            assertThat(root.getJsonObject("args").getString("foo"), is("bar"));
-            assertThat(root.getString("url"), is("https://httpbin.org/get?foo=bar"));
+            assertThat(root.getJsonObject("args").getJsonArray("foo").getString(0), is("bar"));
+            assertThat(root.getString("url"), is("https://httpbingo.org/get?foo=bar"));
             assertThat(root.getJsonObject("headers").get("Cache-Control"), nullValue());
             assertThat(root.getJsonObject("headers").get("Pragma"), nullValue());
@@ -129,10 +129,10 @@
     @Test
     public void testHeaders() throws IOException {
-        try (InputStream in = HttpClient.create(new URL("https://httpbin.org/headers")).connect(progress).getContent();
+        try (InputStream in = HttpClient.create(new URL("https://httpbingo.org/headers")).connect(progress).getContent();
              JsonReader json = JsonProvider.provider().createReader(in)) {
             final JsonObject headers = json.readObject().getJsonObject("headers");
-            assertThat(headers.getString("Accept"), is("*/*"));
-            assertThat(headers.getString("Accept-Encoding"), is("gzip, deflate"));
-            assertThat(headers.getString("User-Agent"), is(Version.getInstance().getFullAgentString()));
+            assertThat(headers.getJsonArray("Accept").getString(0), is("*/*"));
+            assertThat(headers.getJsonArray("Accept-Encoding").getString(0), is("gzip, deflate"));
+            assertThat(headers.getJsonArray("User-Agent").getString(0), is(Version.getInstance().getFullAgentString()));
         }
     }
@@ -144,5 +144,5 @@
     @Test
     public void testUserAgent() throws IOException {
-        try (InputStream in = HttpClient.create(new URL("https://httpbin.org/user-agent")).connect(progress).getContent();
+        try (InputStream in = HttpClient.create(new URL("https://httpbingo.org/user-agent")).connect(progress).getContent();
              JsonReader json = JsonProvider.provider().createReader(in)) {
             assertThat(json.readObject().getString("user-agent"), is(Version.getInstance().getFullAgentString()));
@@ -156,5 +156,5 @@
     @Test
     public void testFetchUtf8Content() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/encoding/utf8")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/encoding/utf8")).connect(progress);
         assertThat(response.getResponseCode(), is(200));
         final String content = response.fetchContent();
@@ -170,5 +170,5 @@
     public void testPost() throws IOException {
         final String text = "Hello World!\nGeetings from JOSM, the Java OpenStreetMap Editor";
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/post"), "POST")
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/post"), "POST")
                 .setHeader("Content-Type", "text/plain")
                 .setRequestBody(text.getBytes(StandardCharsets.UTF_8))
@@ -184,5 +184,5 @@
     @Test
     public void testPostZero() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/post"), "POST")
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/post"), "POST")
                 .setHeader("Content-Type", "text/plain")
                 .setRequestBody("".getBytes(StandardCharsets.UTF_8))
@@ -196,17 +196,17 @@
     }
 
-    /*@Test
+    @Test
     public void testRelativeRedirects() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/relative-redirect/3")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/relative-redirect/3")).connect(progress);
         assertThat(response.getResponseCode(), is(200));
         assertThat(response.getContentLength() > 100, is(true));
-    }*/
-
-    /*@Test
+    }
+
+    @Test
     public void testAbsoluteRedirects() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/absolute-redirect/3")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/absolute-redirect/3")).connect(progress);
         assertThat(response.getResponseCode(), is(200));
         assertThat(response.getContentLength() > 100, is(true));
-    }*/
+    }
 
     /**
@@ -214,8 +214,8 @@
      * @throws IOException if an I/O error occurs
      */
-    /*@Test(expected = IOException.class)
+    @Test(expected = IOException.class)
     public void testTooMuchRedirects() throws IOException {
-        HttpClient.create(new URL("https://httpbin.org/redirect/3")).setMaxRedirects(2).connect(progress);
-    }*/
+        HttpClient.create(new URL("https://httpbingo.org/redirect/3")).setMaxRedirects(2).connect(progress);
+    }
 
     /**
@@ -226,9 +226,10 @@
     public void testHttp418() throws IOException {
         // https://tools.ietf.org/html/rfc2324
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/status/418")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/status/418")).connect(progress);
         assertThat(response.getResponseCode(), is(418));
-        final String content = response.fetchContent();
-        assertThat(content, containsString("-=[ teapot ]=-"));
-        assertThat(captured.getMessage(), containsString("-=[ teapot ]=-"));
+        assertThat(response.getHeaderField("X-More-Info"), is("http://tools.ietf.org/html/rfc2324"));
+        final String content = response.fetchContent();
+        assertThat(content, containsString("I'm a teapot!"));
+        assertThat(captured.getMessage(), containsString("I'm a teapot!"));
         assertThat(captured.getLevel(), is(Logging.LEVEL_DEBUG));
     }
@@ -241,5 +242,5 @@
     public void testHttp401() throws IOException {
         // https://tools.ietf.org/html/rfc2324
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/status/401")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/status/401")).connect(progress);
         assertThat(response.getResponseCode(), is(401));
         assertThat(response.getResponseMessage(), equalToIgnoringCase("UNAUTHORIZED"));
@@ -257,5 +258,5 @@
     public void testHttp402() throws IOException {
         // https://tools.ietf.org/html/rfc2324
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/status/402")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/status/402")).connect(progress);
         assertThat(response.getResponseCode(), is(402));
         assertThat(response.getResponseMessage(), equalToIgnoringCase("PAYMENT REQUIRED"));
@@ -273,5 +274,5 @@
     public void testHttp403() throws IOException {
         // https://tools.ietf.org/html/rfc2324
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/status/403")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/status/403")).connect(progress);
         assertThat(response.getResponseCode(), is(403));
         assertThat(response.getResponseMessage(), equalToIgnoringCase("FORBIDDEN"));
@@ -289,5 +290,5 @@
     public void testHttp404() throws IOException {
         // https://tools.ietf.org/html/rfc2324
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/status/404")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/status/404")).connect(progress);
         assertThat(response.getResponseCode(), is(404));
         assertThat(response.getResponseMessage(), equalToIgnoringCase("NOT FOUND"));
@@ -305,5 +306,5 @@
     public void testHttp500() throws IOException {
         // https://tools.ietf.org/html/rfc2324
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/status/500")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/status/500")).connect(progress);
         assertThat(response.getResponseCode(), is(500));
         assertThat(response.getResponseMessage(), equalToIgnoringCase("INTERNAL SERVER ERROR"));
@@ -320,5 +321,5 @@
     @Test
     public void testRequestInTime() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/delay/1")).setReadTimeout(2000).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/delay/1")).setReadTimeout(2000).connect(progress);
         assertThat(response.getResponseCode(), is(200));
     }
@@ -330,5 +331,5 @@
     @Test(expected = IOException.class)
     public void testTakesTooLong() throws IOException {
-        HttpClient.create(new URL("https://httpbin.org/delay/1")).setReadTimeout(500).connect(progress);
+        HttpClient.create(new URL("https://httpbingo.org/delay/1")).setReadTimeout(500).connect(progress);
     }
 
@@ -339,5 +340,5 @@
     @Test
     public void testDeflate() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/deflate")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/deflate")).connect(progress);
         assertThat(response.getResponseCode(), is(200));
         try (InputStream in = response.getContent();
@@ -353,5 +354,5 @@
     @Test
     public void testGzip() throws IOException {
-        final HttpClient.Response response = HttpClient.create(new URL("https://httpbin.org/gzip")).connect(progress);
+        final HttpClient.Response response = HttpClient.create(new URL("https://httpbingo.org/gzip")).connect(progress);
         assertThat(response.getResponseCode(), is(200));
         try (InputStream in = response.getContent();
