Re: [XHR2] overrideMimeType in state UNSENT

On Thu, 10 Nov 2011 07:53:29 +0100, Jonas Sicking <jonas@sicking.cc> wrote:
> On Wed, Nov 9, 2011 at 9:39 AM, Anne van Kesteren <annevk@opera.com>  
> wrote:
>> If we change this it makes sense to change withCredentials and timeout  
>> too I
>> would say.
>
> Agreed.

I forgot that timeout you could set at any point, because you might change  
your mind on it while the request is ongoing.

I changed overrideMimeType and responseType to only throw at LOADING/DONE.  
To allow for UA optimization we do not want to allow authors to set these  
while the response is coming in.

I changed withCredentials to only throw when not UNSENT/OPENED or if the  
send() flag is true.


>> What about setRequestHeader()?
>
> This one is trickier. I would be more concerned about compatibility
> given that the function has been around forever and has always applied
> only to the current request.
>
> Additionally, since there is no API for getting the current set of
> request headers, it makes it hard to inspect an XHR object to ensure
> that it's in the correct state before reusing it.

Andrew is saying Gecko does not reset the author request headers. Should  
we expose the author request headers? (If we should, can you start a  
separate thread. Maybe now is the time to improve this part of the API.)


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

Received on Monday, 14 November 2011 13:20:32 UTC