|
|
|
|
@ -897,9 +897,9 @@ public class HtmlUnitRequestBuilderTests {
@@ -897,9 +897,9 @@ public class HtmlUnitRequestBuilderTests {
|
|
|
|
|
private static void assertUrlAndPorts(HttpServletRequest request, String url, int serverPort, boolean secure) { |
|
|
|
|
assertThat(request.getRequestURL()).asString().as("url").isEqualTo(url); |
|
|
|
|
assertThat(request.getServerPort()).as("server port").isEqualTo(serverPort); |
|
|
|
|
// In a mocked request, the local post is always the same as the server port.
|
|
|
|
|
// In a mocked request, the local port is always the same as the server port.
|
|
|
|
|
assertThat(request.getLocalPort()).as("local port").isEqualTo(serverPort); |
|
|
|
|
// Remote Port is always 80 (MockHttpServletRequest.DEFAULT_SERVER_PORT),
|
|
|
|
|
// Remote port is always 80 (MockHttpServletRequest.DEFAULT_SERVER_PORT),
|
|
|
|
|
// since a mocked request does not influence the remote host, port, or address.
|
|
|
|
|
assertThat(request.getRemotePort()).as("remote port").isEqualTo(80); |
|
|
|
|
|
|
|
|
|
|