[whatwg] Server-Sent Events parsing issue
taka.atsushi at googlemail.com
Mon Oct 11 21:41:59 PDT 2010
It's a minor error in the spec in the Server-Sent Events spec.
When processing a line with only "data:", the data buffer will be the
empty string and the LF character added at the "process the field"
stage. When dispatching the event, the first step "If the data buffer
is an empty string, set the data buffer and the event name buffer to
the empty string and abort these steps." does not apply here (since we
have the LF character, which will be removed in the step 2). So it
does fire a MessageEvent with an empty string as the data property.
I think the steps 1 and 2 of the dispatching should be the other way round.
More information about the whatwg