Re: XHR LC comment: header encoding

On Mon, 04 Jan 2010 21:57:34 +0100, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> If we don't have a requirement to preserve any possible JS string via  
> this API, then we probably have more flexibility..

I don't think we have that requirement.

I tested Opera a bit further and it seems to simply remove the first byte  
of a 16-bit code unit on setting. So e.g. U+FFFD becomes FD and U+033A  
becomes 3A. (This seems to match what you call byte-inflation.) I  
personally quite like this. It is very predictable and allows you to  
submit any valid HTTP header.

If Gecko can switch back to this behavior as well other browsers are  
probably willing to follow. Unless there are strong objections I will  
define this behavior in the specification. I.e. byte-inflation for both  
setting and getting headers.


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

Received on Tuesday, 5 January 2010 05:51:47 UTC