This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13761 - Now that event data can be discarded (if there is no newline before eof), the last id field value received should be stored in a buffer and set as the EventSource's lastEventId only when the event is actually dispatched. That way the id associated with th
Summary: Now that event data can be discarded (if there is no newline before eof), the...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Server-Sent Events (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: public-webapps-bugzilla
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 16:27 UTC by contributor
Modified: 2011-10-11 00:46 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2011-08-11 16:27:07 UTC
Specification: http://dev.w3.org/html5/eventsource/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
Now that event data can be discarded (if there is no newline before eof), the
last id field value received should be stored in a buffer and set as the
EventSource's lastEventId only when the event is actually dispatched. That way
the id associated with the discarded event data can also be discarded.

Posted from: 89.233.225.89
User agent: Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; SonyEricssonMT15i Build/3.0.1.A.0.145) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Comment 1 vic99999 2011-09-19 03:45:13 UTC
may be it's better to not process an event stream if there is no newline?
Comment 2 vic99999 2011-09-19 16:10:02 UTC
(In reply to comment #1)
> may be it's better to not process an event stream if there is no newline?

*empty line
Comment 3 Ian 'Hixie' Hickson 2011-10-11 00:45:31 UTC
I don't understand comment 1 and comment 2.

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with original comment.
Comment 4 contributor 2011-10-11 00:46:01 UTC
Checked in as WHATWG revision r6658.
Check-in comment: Don't set the lastEventID unless you get a blank line after the event, so that interrupted events don't set it.
http://html5.org/tools/web-apps-tracker?from=6657&to=6658