Re: Redirects and headers

On Tue, Jul 5, 2011 at 2:36 AM, Anne van Kesteren <annevk@opera.com> wrote:

> On Mon, 04 Jul 2011 20:06:55 +0200, Darin Fisher <darin@chromium.org>
> wrote:
>
>> It seems like XHR's followRedirects attribute gives devs enough control
>> here.  XHR should at least document default header propagation behavior if
>> HTTP will not.
>>
>
> followRedirects is out for now.
>

I see.  I was looking at an older version of the spec (
http://www.w3.org/TR/XMLHttpRequest2/#the-followredirects-attribute).

Do you have a pointer to the discussion about the removal of this feature?
 It seemed useful to me, although I had concerns that we didn't have a
companion method to help developers construct the redirect request.



>
> Anyway, there are plenty of other APIs too, e.g. EventSource. And even if
> we added functionality to XMLHttpRequest we would still need to define the
> default. Adding more features does not solve any existing problems.
>

This is off-topic, but I think it is unfortunate that EventSource and XHR
don't share some common interface for configuring the underlying HTTP
request.  There's more than just redirect behavior that could be
interesting.  You also have custom HTTP request headers.



>
> And if this decision is entirely up to the APIs, please have the HTTP
> specification say so. E.g. "Note: Clients will have to decide which headers
> sent in the original request are used in the request to the redirected
> location."


I agree with you that the HTTP spec should at least offer some guidance.  If
the HTTP spec is not going to describe what web browsers do in response to a
redirect, then what spec will cover that?  I agree that it is a crucial
detail.

-Darin


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

Received on Wednesday, 6 July 2011 17:13:04 UTC