Re: XHR content-type rewriting

On 2011-11-17 01:55, Boris Zbarsky wrote:
> On 11/17/11 2:18 AM, Julian Reschke wrote:
>> - Opera and IE do not rewrite the type; so if the caller sets the wrong
>> charset, this is what is sent to the server
>
> Which on the face of it is broken....

Absolutely. It would be less broken spec-wise if XHR stated that adding 
the charset in setRequestHeader is illegal. Minimally, it should 
recommend not to include it as it's pointless.

>> - Finally, only Firefox attempts to preserve the casing of the charset
>> param - this may indicate that the workaround added for the
>> aforementioned bug isn't needed anymore.
>
> It indicates that the WebKit-based browsers are the only ones who end up
> with a differently-cased charset if the page does set the right charset
> in the "wrong" case.
>
> Whether the workaround is needed then depends on server behavior. Note
> that there were multiple servers that ran into the issue back when we
> added the workaround.

Understood. Maybe FF was the first trying the charset injection, and the 
server-side situation has improved since?

Best regards, Julian

Received on Thursday, 17 November 2011 06:15:25 UTC