W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [XHR] Redirects

From: Darin Fisher <darin@chromium.org>
Date: Tue, 14 Sep 2010 09:52:10 -0700
Message-ID: <AANLkTimWecFvOf+YriaXmtH=+mOT_Az1R4AxEMUrUw3w@mail.gmail.com>
To: James Leigh <james-nospam@leighnet.ca>
Cc: Anne van Kesteren <annevk@opera.com>, WebApps WG <public-webapps@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:40 GMT