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:55:28 -0700
Message-ID: <AANLkTi=uyV1zmO_j51NCryHru6Vb3mZdvFfsg3ZpGQEA@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: WebApps WG <public-webapps@w3.org>
On Mon, Sep 13, 2010 at 7:35 AM, Anne van Kesteren <annevk@opera.com> wrote:

> On Wed, 01 Sep 2010 23:59:17 +0200, Darin Fisher <darin@chromium.org>
> wrote:
>
>> On Wed, Sep 1, 2010 at 1:16 AM, Anne van Kesteren <annevk@opera.com>
>> wrote:
>>
>>> That seems like the current design, except we currently do not have that
>>> additional method. I would like to keep it out until it is more clear
>>> this
>>> is a real problem. It would add quite a bit of complexity whereas just
>>> having this is fairly straightforward.
>>>
>>
>> The problems I've raised here are real problems that I've observed while
>> building HTTP implementations for Mozilla and Chromium.  It is easy for
>> good coders to make these kinds of mistakes.
>>
>
> I did not mean to downplay the problems you were raising. Do you think we
> should have a method like openPreserveState() that unlike open() does not
> reset a bunch of information? So to handle a redirect you would do
> openPreserveState(); send(); after the initial request if status is one of
> 301/302/303/307. (You might have to do some more.)
>

That's a very interesting idea.  Maybe it should be more specific, like
openRedirectedLocation?  That said, if one still has to call .send()
afterwards, then we are still leaving it up to the caller to pass the right
value to .send().  They have to know when the method is being changed from
POST to GET and take appropriate action.  That is a bit unfortunate.  Maybe
.send() and .openPreserveState() could just be combined into a single
.followRedirect() method?



>
> Do you think I should comment out the followRedirects feature for now? At
> until we address the problem of how to follow it easily?


I don't have strong opinions about that.  It is up to you.  I think it is OK
to iterate :)
-Darin



>
>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
Received on Tuesday, 14 September 2010 16:55:59 GMT

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