Re: [XHR] Redirects

On Mon, Sep 13, 2010 at 8:51 AM, James Leigh <james-nospam@leighnet.ca>wrote:

> On Wed, 2010-09-01 at 01:03 -0700, Darin Fisher wrote:
> >
> > I thought of another reason to want the original XHR object to be
> > responsible for following the redirect:  the value of a Location
> > header may be a relative URL.  It would be nice if application authors
> > did not have to take care of resolving that manually.  (In the case of
> > a cross-origin request, the relative URL should be resolved relative
> > to the URL that was redirected instead of against the Document.)  This
> > seems like something that could be easy to mess up.
> >
> >
> > -Darin
>
>
> I want to point out that resolving the Location header is not specific
> to 3XX responses. A 201 (Created) response also includes a Location
> header that may need to be resolved. If the problem of providing a way
> to resolve redirect is addressed it might be good to also address the
> problem of resolving 201 locations as well.
>
> One suggestion might be to provide a getResponseLocation() that returns
> the resolved Location header.
>
> James
>
>

That's a good point.  Note, resolving the Location header is only one of the
issues.  Another is knowing what HTTP method to use in response to a
redirect.

-Darin

Received on Tuesday, 14 September 2010 16:52:42 UTC