Re: [XHR2] overrideMimeType

Anne van Kesteren wrote:
> 
> On Fri, 27 Jul 2007 21:09:37 +0200, Jonas Sicking <jonas@sicking.cc> wrote:
>> It does seem fairly complicated to allow it to be set after the 
>> download is finished though. You do have the stream stored in 
>> .reponse[Text], but at that point all encoding information has been 
>> lost. For HTML parsing (which I hope the spec will support in the 
>> future) there are a pile of rules used to guess the encoding, all of 
>> which would be useful to use, but can't be used if all you have access 
>> to is the unencoded responseBody.
> 
> It would make sense for consistency with the other methods if the method 
> throws if you try to invoke it after send() has been invoked. Can that 
> still be changed in implementations? And maybe also throw a SYNTAX_ERR 
> if it does not match the MIME type syntax (also for consistency).

For mozilla this would be an easy change since setting it after data 
starts coming in is a no-op. So we don't really risk breaking anyone who 
wasn't broken already.

Sounds like it would be a bigger change for apple.

/ Jonas

Received on Sunday, 29 July 2007 02:33:15 UTC