Skip to content

IPV6 server name fails #169

@magnNorth

Description

@magnNorth

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

   if upstream == ngx_var.http_host then
        upstream = ngx_var.server_addr
        port = ngx_var.server_port
    end

`
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions