diff options
author | Loïc Hoguin <[email protected]> | 2020-03-26 09:57:10 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-03-26 09:57:10 +0100 |
commit | a7e069e6ff2729d774c712e3ddd01d3348202db6 (patch) | |
tree | ab1a67d72df6214708723f7f6128b0eeb5b298a1 /test/rfc7540_SUITE.erl | |
parent | d1d02a0ebc1a5d9852b7fe5216ac4ce628fb1744 (diff) | |
download | gun-a7e069e6ff2729d774c712e3ddd01d3348202db6.tar.gz gun-a7e069e6ff2729d774c712e3ddd01d3348202db6.tar.bz2 gun-a7e069e6ff2729d774c712e3ddd01d3348202db6.zip |
Fix IPv6 related changes to tests
Turns out we can't rely on IPv4 being available if we set
the socket in IPv6 mode. Instead the origin is modified to
either setup IPv4 or IPv6 depending on the test's needs.
Diffstat (limited to 'test/rfc7540_SUITE.erl')
-rw-r--r-- | test/rfc7540_SUITE.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rfc7540_SUITE.erl b/test/rfc7540_SUITE.erl index 56447a3..37e6903 100644 --- a/test/rfc7540_SUITE.erl +++ b/test/rfc7540_SUITE.erl @@ -38,7 +38,7 @@ authority_default_port_https(_) -> authority_ipv6(_) -> doc("When connecting to a server using an IPv6 address the :authority " "pseudo-header must wrap the address with brackets. (RFC7540 8.1.2.3, RFC3986 3.2.2)"), - {ok, OriginPid, OriginPort} = init_origin(tcp, http2, fun(Parent, Socket, Transport) -> + {ok, OriginPid, OriginPort} = init_origin(tcp6, http2, fun(Parent, Socket, Transport) -> %% Receive the HEADERS frame and send the headers decoded. {ok, <<Len:24, 1:8, _:8, 1:32>>} = Transport:recv(Socket, 9, 1000), {ok, ReqHeadersBlock} = Transport:recv(Socket, Len, 1000), |