Skip to content

Commit

Permalink
Adding IPv6 Address (non-literal) without port test case
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Jan 14, 2021
1 parent b99eb3f commit 25a3d19
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,18 @@ public static Stream<Arguments> cases()
.requestURL("http://myhost/")
.remoteAddr("10.9.8.7").remotePort(1111)
),
Arguments.of(new Request("X-Forwarded-For (IPv6 without port)")
.headers(
"GET / HTTP/1.1",
"Host: myhost",
"X-Forwarded-For: 2001:db8:cafe::17"
),
new Expectations()
.scheme("http").serverName("myhost").serverPort(80)
.secure(false)
.requestURL("http://myhost/")
.remoteAddr("[2001:db8:cafe::17]").remotePort(0)
),
Arguments.of(new Request("X-Forwarded-For (IPv6 with port)")
.headers(
"GET / HTTP/1.1",
Expand Down

0 comments on commit 25a3d19

Please sign in to comment.