]> git.kaiwu.me - nginx.git/commit
Added support for IP-literal in the Host header and request line (ticket #1).
authorValentin Bartenev <vbart@nginx.com>
Mon, 28 Nov 2011 09:15:33 +0000 (09:15 +0000)
committerValentin Bartenev <vbart@nginx.com>
Mon, 28 Nov 2011 09:15:33 +0000 (09:15 +0000)
commit137355816326a2c6212ae1c0f30e23473ca11c3d
tree7de47dbc353b76235f19b110adec8848e289fda0
parent1b9b19d7e2a2fcd3d2b773b64f198cec354f384c
Added support for IP-literal in the Host header and request line (ticket #1).

Additional parsing logic added to correctly handle RFC 3986 compliant IPv6 and
IPvFuture characters enclosed in square brackets.

The host validation was completely rewritten. The behavior for non IP literals
was changed in a more proper and safer way:

 - Host part is now delimited either by the first colon or by the end of string
   if there's no colon. Previously the last colon was used as delimiter which
   allowed substitution of a port number in the $host variable.
   (e.g. Host: 127.0.0.1:9000:80)

 - Fixed stripping of the ending dot in the Host header when the host was also
   followed by a port number.
   (e.g. Host: nginx.com.:80)

 - Fixed upper case characters detection. Previously it was broken which led to
   wasting memory and CPU.
src/http/ngx_http_parse.c
src/http/ngx_http_request.c