#94 ✓hold
Michael Schnupp

HTTP_HOST parse error

Reported by Michael Schnupp | January 24th, 2009 @ 10:12 PM | in Future

HTTP_HOST seems to get split into SERVER_NAME and SERVER_PORT on the first colon. This breaks literal IPv6 addresses.

For example "[::1]:4567" is split into "[" and ":1]:4567" which is obviously wrong.

The problem seems to be somewhere in thin_parser, but I did not manage to find the exact location.

A quick test with mongrel showed exactly the same problem. Is this the same code?

Comments and changes to this ticket

  • macournoyer

    macournoyer January 26th, 2009 @ 10:00 AM

    • Tag set to ipv6

    @Michael yes, the parser is the same code as Mongrel.

    Here's the code that does the magic: http://github.com/macournoyer/th...

    You need to use IPv6 address?

  • Michael Schnupp

    Michael Schnupp January 26th, 2009 @ 05:07 PM

    Well, I don't really need literal IPv6 addresses, but it obviously does the wrong thing if you use them, so I would call it a bug and thought you should know about it. ;)

    If it's easy to fix, that would be nice, but when I look at the code of the standard URI class, doing it right(tm) is a bit more complex, so guess I can live with it. (If I should really need it, I could simply parse HTTP_HOST by myself.)

  • macournoyer

    macournoyer March 16th, 2009 @ 08:55 PM

    • State changed from “new” to “hold”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket