File tree Expand file tree Collapse file tree
runtime/test/src/test/java/com/google/apphosting/runtime/jetty9 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,19 +135,14 @@ public void testWithIPv6() throws Exception {
135135 .send ();
136136 assertThat (response .getStatus (), equalTo (HttpStatus .OK_200 ));
137137 contentReceived = response .getContentAsString ();
138- if (jettyVersion .equals ("9.4" )) {
139- assertThat (
140- contentReceived , containsString ("getRemoteAddr: [2001:db8:85a3:8d3:1319:8a2e:370:7348]" ));
141- assertThat (
142- contentReceived , containsString ("getRemoteHost: [2001:db8:85a3:8d3:1319:8a2e:370:7348]" ));
143- } else {
144- // The correct behaviour for getRemoteAddr and getRemoteHost is to not include []
145- // because they return raw IP/hostname and not URI-formatted addresses.
146- assertThat (
147- contentReceived , containsString ("getRemoteAddr: 2001:db8:85a3:8d3:1319:8a2e:370:7348" ));
148- assertThat (
149- contentReceived , containsString ("getRemoteHost: 2001:db8:85a3:8d3:1319:8a2e:370:7348" ));
150- }
138+
139+ // The correct behaviour for getRemoteAddr and getRemoteHost is to not include []
140+ // because they return raw IP/hostname and not URI-formatted addresses.
141+ assertThat (
142+ contentReceived , containsString ("getRemoteAddr: 2001:db8:85a3:8d3:1319:8a2e:370:7348" ));
143+ assertThat (
144+ contentReceived , containsString ("getRemoteHost: 2001:db8:85a3:8d3:1319:8a2e:370:7348" ));
145+
151146 assertThat (contentReceived , containsString ("getRemotePort: 0" ));
152147 assertThat (contentReceived , containsString ("getLocalAddr: 0.0.0.0" ));
153148 assertThat (contentReceived , containsString ("getLocalName: 0.0.0.0" ));
You can’t perform that action at this time.
0 commit comments