A bug when Host header contain IPv6 address

Maxim Dounin mdounin at mdounin.ru
Wed Aug 31 09:08:04 UTC 2011


On Wed, Aug 31, 2011 at 03:37:28AM -0400, speedfirst wrote:

> For a request with an IPv6 Host header like:
> Host: Host: [2001:250:1800:1::88]
> The function "ngx_http_validate_host" will consider the trailing ":88]"
> as a port number and trim it. Therefore the value of
> "r->headers_in.server" and "$host" will become:

This is a known problem, please see


The same applies to the patch submitted.

Maxim Dounin

More information about the nginx mailing list