HTTP redirects

Hey,

So I'm trying to work out how much I need to define and how much HTTP
defines for me. (The context is defining the fetching architecture for
<img>, <script>, CSS url(), XMLHttpRequest, etc. Nothing published yet
thus far.) In general I define a redirect as having a status code of
301, 302, 303, 307, or 308. The other status codes are not
automatically followed, so don't really matter here.

Now these might not matter either, if the response lacks a Location
header, or if the Location header cannot be parsed (e.g. in its value
the URL scheme contains a space). There's also the case of multiple
Location headers. Ah, and the age old issue of using
http://url.spec.whatwg.org/ for parsing so Location: /a b/ works as
some sites expect.

I studied http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.2
but it's of little help at this point and there's no open issues as
far as I can tell...

(I'm also thinking of either enforcing specified limit of 20 or a
lower limit of allowed redirects as there are some compatibility
issues there too.)

Cheers,


-- 
http://annevankesteren.nl/

Received on Wednesday, 27 February 2013 18:07:26 UTC