438204 getServerName returns IPv6 addresses wrapped in []
This commit is contained in:
parent
42e1a60d65
commit
068ec21419
|
@ -18,7 +18,10 @@
|
|||
|
||||
package org.eclipse.jetty.http;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -1348,7 +1351,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);
|
||||
}
|
||||
|
||||
|
@ -1426,7 +1429,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -485,7 +485,7 @@ public class RequestTest
|
|||
assertThat(response, Matchers.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++));
|
||||
|
||||
|
||||
|
@ -499,7 +499,7 @@ public class RequestTest
|
|||
assertThat(response, Matchers.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++));
|
||||
|
||||
|
||||
|
@ -515,7 +515,7 @@ public class RequestTest
|
|||
assertThat(response, Matchers.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++));
|
||||
|
||||
|
||||
|
@ -531,7 +531,7 @@ public class RequestTest
|
|||
assertThat(response, Matchers.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++));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue