Re: [XHR] Redirects

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

Received on Monday, 13 September 2010 15:52:13 UTC