Re: URI handling for Location

On Wed, 8 Apr 2009, Anne van Kesteren wrote:

> return Location with a non-absolute URI and are expected to work fine. In 
> addition those Location header values also do not match the URI syntax 
> because they contain a space and backslash respectively. Still, they work 
> fine in Web browsers and curl/wget etc.

I must admit I was deeply disturbed that day a couple of years ago when I 
realized that our browsers handle spaces in Location: headers by replacing 
them with %20. But I still proceeded and made (lib)curl behave that way as 
well since people expect it to be able to act like the browsers.

The fact that sites all over the world uses relative URIs in Location: headers 
is hardly a secret and I would even say (without any scientific research nor 
proof) that the majority of Location: headers are.

-- 

  / daniel.haxx.se

Received on Wednesday, 8 April 2009 11:59:22 UTC