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

Julien Chaffraix julien.chaffraix at gmail.com
Wed Mar 23 21:52:02 PDT 2011


Hi,

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.

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,
Julien

[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


More information about the whatwg mailing list