Subject: URI handling for Location

From: "Anne van Kesteren" <[email-masked]>
Date: Mon, 30 Mar 2009 14:25:59 +0200

Hi,

The definition of the Location header differs in various ways of how at  
least Web browsers need to deal with them to interoperate with content on  
the Web:

  1. Need to handle relative URIs.
  2. Need to handle with spaces and other invalid URI characters in the  
same way as done by e.g. HTML and CSS. (Percent-encode them rather than  
treat it as error.)

I suspect that any other tool that wants to deal with content on the Web  
would have similar issues. There's some discussion here including two  
sites this effects:

   http://krijnhoetmer.nl/irc-logs/whatwg/20090323#l-152

(I suspect that every feature that takes a URI is similarly affected, but  
I have not toyed with those.)

(There was also a related issue for Location regarding how to handle it  
when there's more than one such header, but I believe that was raised  
already.)

-- 
Anne van Kesteren
http://annevankesteren.nl/

---

From: Daniel Stenberg <[email-masked]>
Date: Mon, 30 Mar 2009 14:30:33 +0200 (CEST)

> least Web browsers need to deal with them to interoperate with content on 

Of course they don't NEED TO do this but since some browsers started doing 
this crap a long time ago, the lazy web authors just went with what worked and 
now everything else on the planet that wants to play HTTP like the browsers do
are forced to follow along with these stupidities...

-- 

  / daniel.haxx.se

---

From: "Anne van Kesteren" <[email-masked]>
Date: Mon, 30 Mar 2009 14:37:45 +0200

On Mon, 30 Mar 2009 14:30:33 +0200, Daniel Stenberg <[email-masked]> wrote:
>> least Web browsers need to deal with them to interoperate with content  
>> on the Web:
>
> Of course they don't NEED TO do this but since some browsers started  
> doing this crap a long time ago, the lazy web authors just went with  
> what worked and now everything else on the planet that wants to play  
> HTTP like the browsers do

Quite. I was not responsible for this mess. I just think it would help if  
it was defined so that in the future implementors of clients can just look  
at the specification rather than having to reverse engineer other clients.  
(Having it clearly defined (and a good test suite) hopefully also helps  
prevent future deviations.)