Bug #592
400 - Bad Request to Safari with literal IPv6 addresses
| Status: | Invalid | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | core | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | invalid |
|
| Patch available: |
Description
Using Safari to access a literal IPv6 address (e.g. 2001:4830:151a:d610::2/">http://2001:4830:151a:d610::2/), Safari sends the Host field in the request header as 2001:4830:151a:d610::2, instead of 2001:4830:151a:d610::2, as Mozilla does, and which generates a correct response. As a result, lighttpd responds with a 400 - Bad Request error. I'm assuming that the problem arises from the ambiguity of whether the terminal : is followed by the last octet of the address or by a port number, and the bad request message is generated by the multiplicity of colons.
A reasonable thing to do is probably just to drop the error checking for this particular case (or at least in the case where the Host field could reasonably be parsed as an IPv6 address). It might conceivably, possibly, mess up virtual hosting in the extremely rare event that someone has a vhost set up that appears only when people access it from a literal IPv6 address.
-- nathanw