lower casing host names

Hi friends,

I've walked into an issue I just wanted to bring here for attention and 
possibly some feedback.

A curl user noticed that when he reqeusted a URI with a mixed case host name, 
the site would redirect to the same host name with all letters in lower case. 
(And since curl would re-use the same connection and the same Host: header it 
resent the same mixed case request that again gets redirected... and it turns 
into a nice loop.)

I consider treating the host name differently only based on different casing a 
protocol violation of the target server/software in question, but curious 
about this I tried out chrome and firefox to see how they handle this case.

It turns out both browsers always unconditionally lower case the host name in 
URIs so they never send HTTP requests with mixed case.

Why do they do this? Is this behavior of treating names differently based on
case common? If so, should httpbis mention it?

Unfortunately this will now also push curl towards this behavior. We haven't 
yet decided how to act, but forcibly lowercasing made it work fine against 
this particular host where this issue arose...

-- 

  / daniel.haxx.se

Received on Friday, 30 December 2011 15:18:44 UTC