W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] EventSource - Handling a charset in the content-type header

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 16 Jun 2011 23:13:00 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1106162312530.19153@ps20323.dreamhostps.com>
On Thu, 24 Mar 2011, Ian Hickson wrote:
> On Wed, 23 Mar 2011, Julien Chaffraix wrote:
> > 
> > the EventSource specification states the current content-type header
> > should match the string "text/event-stream". However following some
> > bugs opened inside the WebKit project [1], we relaxed the content-type
> > check to ignore any specified charset as it confused developers and
> > can potentially break existing servers that automatically send a
> > charset as part of the response [2].
> >
> > We are currently revisiting our approach and our current take would be
> > to allow a mime-type of "text/event-stream" with an optional
> > charset="UTF-8". No other charset would be allowed as UTF-8 is the
> > only encoding supported by the standard.
> 
> That seems like a reasonable compromise given the legacy servers.
> 
> > We are not set-up on the best way to fix this and would like to reach
> > a consensus before correcting our existing behavior so that the
> > specification is clarified on this point. Also note that the same
> > problem exists for the application cache [3].
> 
> Thanks for bringing it up. I'll update the spec at some point to mention 
> that these MIME types are to handled such that a "charset" parameter with 
> a value that is an ASCII case-insensitive match for the string "utf-8" 
> should be ignored in determining whether the types are recognised.
> 
> > [1] https://bugs.webkit.org/show_bug.cgi?id=45372
> > [2] https://bugs.webkit.org/show_bug.cgi?id=45372#c30
> > [3] http://dev.w3.org/html5/spec/offline.html#writing-cache-manifests

This is now done.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 16 June 2011 16:13:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:34 UTC