Open magnNorth opened 6 years ago
Yeah looks like ngx.socket.tcp requires ipv6 addresses to be wrapped as well, but hte server_addr var doesn't wrap them. https://github.com/openresty/lua-nginx-module/blob/90d7522342e78ecb1f1ea2b5d066ade404a48b24/t/058-tcp-socket.t#L3251
I guess we'll have to detect ipv6 server_addr values and wrap them ourselves!
Hey, trying to pass an ipv6 request through esi make thing fall over. https://github.com/pintsized/ledge/blob/35bbcdadc55f65c1c3e43f0ebd054868e345eb94/lib/ledge/esi.lua#L366
the error
esi.lua:373: esi_fetch_include(): failed to parse host name "9999:da0:a8:f610::f:316": invalid port connecting to 9999:da0:a8:f610::f:316:443
suggests that the format of the request is incorrect. Testing with simple curls: curl -g -6 https://9999:da0:a8:f610::f:316:443 - fails while curl -g -6 https://[9999:da0:a8:f610::f:316]:443 - work just fine.
I have bypassed the effect of this code block ` local upstream = host
` by ignoring the reassignment of upstream = ngx_var.server_addr. doing this makes the system work correctly but ultimately the detection and correct request for the IPV6 server_addr would be a better solution.