On Sun, Jan 31, 2010 at 06:17:31PM +0100, Dalaih wrote:
Thanks in advance for your help.
Hexadecimal, octal and so on forms aren’t standard. HTTP 1.1 RFC
2616 refers to RFC 2396, which says:
% The host is a domain name of a network host, or its IPv4 address as
% set of four decimal digit groups separated by “.”.
And RFC 3986 (which is newer version of RFC 2396) explicitly
mentions such addresses in section 3.2.2:
% Note that other forms of dotted notation may
% be interpreted on some platforms, as described in Section 7.4, but
% only the dotted-decimal form of four octets is allowed by this
and further clarifies this in section 7.4, see here:
I see nothing wrong in not supporting such addresses. The bad
thing is that nginx has two problems with such addresses right
It doesn’t handle leading 0 specially, therefore addresses like
“0127.0.0.1” will be parsed as 127.0.0.1. This isn’t what people
In some places during config parsing nginx fallbacks to
gethostbyname() when it’s unable to interpret address as ip
literal, and gethosbyname() in it’s turn tries to interpret ip
literals according to it’s own rules. So address like “0127.1”
will be parsed (at least on some systems) as 184.108.40.206.
Probably these two issues should be addressed.