In case the host is an IPv6 address, the I believe the host header should have the IPv6 address wrapped in square brackets ([, ]). The same goes for the :authority pseudo header.
I have located the problem to gun_http:host_header/3 which doesn't add the square brackets after calling inet:ntoa/1. Possibly it suffices to add a case clause for Tuple when tuple_size(Tuple) == 8 for IPv6 and add the brackets there.
In case the host is an IPv6 address, the I believe the host header should have the IPv6 address wrapped in square brackets (
[
,]
). The same goes for the:authority
pseudo header.I have located the problem to
gun_http:host_header/3
which doesn't add the square brackets after callinginet:ntoa/1
. Possibly it suffices to add a case clause forTuple when tuple_size(Tuple) == 8
for IPv6 and add the brackets there.The function for reference: https://github.com/ninenines/gun/blob/master/src/gun_http.erl#L605