Navigation Menu

Skip to content

Commit

Permalink
[giow] (2) Don't set the lastEventID unless you get a blank line afte…
Browse files Browse the repository at this point in the history
…r the event, so that interrupted events don't set it.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13761

git-svn-id: http://svn.whatwg.org/webapps@6658 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 11, 2011
1 parent cef842d commit 9143a8f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 20 deletions.
21 changes: 14 additions & 7 deletions complete.html
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 October 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 11 October 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -80180,9 +80180,10 @@ <h4 id=event-stream-interpretation><span class=secno>11.2.5 </span>Interpreting
(LF) character, and the end of the file being the four ways in which
a line can end.</p>

<p>When a stream is parsed, a <var title="">data</var> buffer and an
<var title="">event name</var> buffer must be associated with
it. They must be initialized to the empty string</p>
<p>When a stream is parsed, a <var title="">data</var> buffer, an
<var title="">event name</var> buffer, and a <var title="">last
event ID</var> buffer must be associated with it. They must be
initialized to the empty string</p>

<p>Lines must be processed, in the order they are received, as
follows:</p>
Expand Down Expand Up @@ -80252,8 +80253,8 @@ <h4 id=event-stream-interpretation><span class=secno>11.2.5 </span>Interpreting

<dt>If the field name is "id"</dt>

<dd><p>Set the event stream's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID</a> to
the field value.</dd>
<dd><p>Set the <var title="">last event ID</var> buffer to the
field value.</dd>


<dt>If the field name is "retry"</dt>
Expand Down Expand Up @@ -80299,7 +80300,13 @@ <h4 id=event-stream-interpretation><span class=secno>11.2.5 </span>Interpreting
</dl><p id=dispatchMessage>When the user agent is required to <dfn title="">dispatch the event</dfn>, then the user agent must act as
follows:

<ol><li><p>If the <var title="">data</var> buffer is an empty string,
<ol><li><p>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
string</a> of the event source to value of the <var title="">last event ID</var> buffer. The buffer does not get reset,
so the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
ID string</a> of the event source remains set to this value
until the next time it is set by the server.</li>

<li><p>If the <var title="">data</var> buffer is an empty string,
set the <var title="">data</var> buffer and the <var title="">event
name</var> buffer to the empty string and abort these
steps.</li>
Expand Down
21 changes: 14 additions & 7 deletions index
Expand Up @@ -240,7 +240,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 10 October 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 11 October 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -80180,9 +80180,10 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
(LF) character, and the end of the file being the four ways in which
a line can end.</p>

<p>When a stream is parsed, a <var title="">data</var> buffer and an
<var title="">event name</var> buffer must be associated with
it. They must be initialized to the empty string</p>
<p>When a stream is parsed, a <var title="">data</var> buffer, an
<var title="">event name</var> buffer, and a <var title="">last
event ID</var> buffer must be associated with it. They must be
initialized to the empty string</p>

<p>Lines must be processed, in the order they are received, as
follows:</p>
Expand Down Expand Up @@ -80252,8 +80253,8 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<dt>If the field name is "id"</dt>

<dd><p>Set the event stream's <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID</a> to
the field value.</dd>
<dd><p>Set the <var title="">last event ID</var> buffer to the
field value.</dd>


<dt>If the field name is "retry"</dt>
Expand Down Expand Up @@ -80299,7 +80300,13 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
</dl><p id=dispatchMessage>When the user agent is required to <dfn title="">dispatch the event</dfn>, then the user agent must act as
follows:

<ol><li><p>If the <var title="">data</var> buffer is an empty string,
<ol><li><p>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID
string</a> of the event source to value of the <var title="">last event ID</var> buffer. The buffer does not get reset,
so the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event
ID string</a> of the event source remains set to this value
until the next time it is set by the server.</li>

<li><p>If the <var title="">data</var> buffer is an empty string,
set the <var title="">data</var> buffer and the <var title="">event
name</var> buffer to the empty string and abort these
steps.</li>
Expand Down
20 changes: 14 additions & 6 deletions source
Expand Up @@ -90754,9 +90754,10 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
(LF) character, and the end of the file being the four ways in which
a line can end.</p>

<p>When a stream is parsed, a <var title="">data</var> buffer and an
<var title="">event name</var> buffer must be associated with
it. They must be initialized to the empty string</p>
<p>When a stream is parsed, a <var title="">data</var> buffer, an
<var title="">event name</var> buffer, and a <var title="">last
event ID</var> buffer must be associated with it. They must be
initialized to the empty string</p>

<p>Lines must be processed, in the order they are received, as
follows:</p>
Expand Down Expand Up @@ -90834,9 +90835,8 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<dt>If the field name is "id"</dt>

<dd><p>Set the event stream's <span
title="concept-event-stream-last-event-id">last event ID</span> to
the field value.</p></dd>
<dd><p>Set the <var title="">last event ID</var> buffer to the
field value.</p></dd>


<dt>If the field name is "retry"</dt>
Expand Down Expand Up @@ -90888,6 +90888,14 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<ol>

<li><p>Set the <span
title="concept-event-stream-last-event-id">last event ID
string</span> of the event source to value of the <var
title="">last event ID</var> buffer. The buffer does not get reset,
so the <span title="concept-event-stream-last-event-id">last event
ID string</span> of the event source remains set to this value
until the next time it is set by the server.</p></li>

<li><p>If the <var title="">data</var> buffer is an empty string,
set the <var title="">data</var> buffer and the <var title="">event
name</var> buffer to the empty string and abort these
Expand Down

0 comments on commit 9143a8f

Please sign in to comment.