diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java index a9a45138229..cb96bef18a7 100644 --- a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java +++ b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java @@ -2057,7 +2057,7 @@ public class HttpParserTest HttpParser.RequestHandler handler = new Handler(); HttpParser parser = new HttpParser(handler); parser.parseNext(buffer); - assertEquals("::1", _host); + assertEquals("[::1]", _host); assertEquals(0, _port); } @@ -2138,7 +2138,7 @@ public class HttpParserTest HttpParser.RequestHandler handler = new Handler(); HttpParser parser = new HttpParser(handler); parser.parseNext(buffer); - assertEquals("::1", _host); + assertEquals("[::1]", _host); assertEquals(8888, _port); } diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpURIParseTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpURIParseTest.java index 6510679f850..add0cd5f4d1 100644 --- a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpURIParseTest.java +++ b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpURIParseTest.java @@ -209,7 +209,7 @@ public class HttpURIParseTest { // Ignore, as URI is invalid anyway } - assumeTrue(javaUri != null, "Skipping, not a valid input URI"); + assumeTrue(javaUri != null, "Skipping, not a valid input URI: " + input); HttpURI httpUri = new HttpURI(javaUri); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java index 6e35eb2b4e4..149d458d872 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/CheckReverseProxyHeadersTest.java @@ -65,7 +65,7 @@ public class CheckReverseProxyHeadersTest @Override public void validate(HttpServletRequest request) { - assertEquals("::1", request.getServerName()); + assertEquals("[::1]", request.getServerName()); assertEquals(80, request.getServerPort()); assertEquals("10.20.30.40", request.getRemoteAddr()); assertEquals("10.20.30.40", request.getRemoteHost()); @@ -83,7 +83,7 @@ public class CheckReverseProxyHeadersTest @Override public void validate(HttpServletRequest request) { - assertEquals("::1", request.getServerName()); + assertEquals("[::1]", request.getServerName()); assertEquals(8888, request.getServerPort()); assertEquals("10.20.30.40", request.getRemoteAddr()); assertEquals("10.20.30.40", request.getRemoteHost()); diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java index 496adb16d21..d61340135e5 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ForwardedRequestCustomizerTest.java @@ -111,7 +111,7 @@ public class ForwardedRequestCustomizerTest assertEquals("http",_results.poll()); assertEquals("myhost",_results.poll()); assertEquals("80",_results.poll()); - assertEquals("2001:db8:cafe::17",_results.poll()); + assertEquals("[2001:db8:cafe::17]",_results.poll()); assertEquals("4711",_results.poll()); } @@ -183,7 +183,7 @@ public class ForwardedRequestCustomizerTest assertEquals("192.0.2.43",_results.poll()); assertEquals("0",_results.poll()); } - + @Test public void testRFC7239_IPv6() throws Exception { @@ -194,9 +194,9 @@ public class ForwardedRequestCustomizerTest "\n"); assertEquals("http",_results.poll()); - assertEquals("2001:db8:cafe::3",_results.poll()); + assertEquals("[2001:db8:cafe::3]",_results.poll()); assertEquals("8888",_results.poll()); - assertEquals("2001:db8:cafe::1",_results.poll()); + assertEquals("[2001:db8:cafe::1]",_results.poll()); assertEquals("0",_results.poll()); } diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java index a93563f24a4..b7add70fecf 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java @@ -835,7 +835,7 @@ public class RequestTest assertThat(response, containsString("200 OK")); assertEquals("http://[::1]/",results.get(i++)); assertEquals("0.0.0.0",results.get(i++)); - assertEquals("::1",results.get(i++)); + assertEquals("[::1]",results.get(i++)); assertEquals("80",results.get(i++)); @@ -849,7 +849,7 @@ public class RequestTest assertThat(response, containsString("200 OK")); assertEquals("http://[::1]:8888/",results.get(i++)); assertEquals("0.0.0.0",results.get(i++)); - assertEquals("::1",results.get(i++)); + assertEquals("[::1]",results.get(i++)); assertEquals("8888",results.get(i++)); @@ -865,7 +865,7 @@ public class RequestTest assertThat(response, containsString("200 OK")); assertEquals("https://[::1]/",results.get(i++)); assertEquals("remote",results.get(i++)); - assertEquals("::1",results.get(i++)); + assertEquals("[::1]",results.get(i++)); assertEquals("443",results.get(i++)); @@ -881,7 +881,7 @@ public class RequestTest assertThat(response, containsString("200 OK")); assertEquals("https://[::1]:8888/",results.get(i++)); assertEquals("remote",results.get(i++)); - assertEquals("::1",results.get(i++)); + assertEquals("[::1]",results.get(i++)); assertEquals("8888",results.get(i++)); }