Re: [XHR2] overrideMimeType

On 7/30/07 12:21 AM, "Jonas Sicking" <jonas@sicking.cc> wrote:

>> If XHR2 offers responseBody with a raw byte array of some kind, it will
>> be required for implementations to keep the raw bytes around anyway.
> 
> Yep. Though it still seems weird to me that responseText would change
> when .overrideMimeType is changed. How do you guys deal with this situation?

  Currently, we only honor MIME type (not charset) change after the response
bytes start to arrive, and only if responseXML hasn't been accessed yet.


Document* XMLHttpRequest::getResponseXML() const
{
    if (m_state != Loaded)
        return 0;

    if (!m_createdDocument) {
// ...if XML MIME type, create a Document from an already decoded response
text...

        m_createdDocument = true;
    }

    return m_responseXML.get();
}


  I also expect that some Dashboard content may easily break if overriding
MIME type after send() stops to work.

- WBR, Alexey Proskuryakov

Received on Monday, 30 July 2007 10:11:08 UTC