W3C home > Mailing lists > Public > public-html-diffs@w3.org > October 2008

spec/Overview.html 1.1532 2359 <eventsource>: clarify error handling ru

From: poot <cvsmail@w3.org>
Date: Wed, 22 Oct 2008 00:18:00 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20081021151801.018642BBE9@toro.w3.mag.keio.ac.jp>

<eventsource>: clarify error handling rules. (whatwg r2359)

Index
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1532.html#index
7.2.3 Parsing an event stream
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1532.html#parsing-an-event-stream
last event ID string
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1532.html#concept-event-stream-last-event-id

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1531&r2=1.1532&f=h
http://html5.org/tools/web-apps-tracker?from=2358&to=2359

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1531
retrieving revision 1.1532
diff -u -d -r1.1531 -r1.1532
--- Overview.html	21 Oct 2008 10:25:01 -0000	1.1531
+++ Overview.html	21 Oct 2008 15:14:56 -0000	1.1532
@@ -33081,23 +33081,24 @@
   from <a href=#the-document-s-domain>the document's domain</a> or explicitly allowed by the
   Access-Control HTTP headers must be processed line by line <a href=#event-stream-interpretation>as described below</a>.<p>For the purposes of such successfully opened event streams only,
   user agents should ignore HTTP cache headers, and instead assume
-  that the resource indicates that it does not wish to be cached.<p>If such a resource completes loading (i.e. the entire HTTP
-  response body is received or the connection itself closes), the user
-  agent should request the event source resource again after a delay
-  equal to the reconnection time of the event source.<p>HTTP 200 OK responses that have a <a href=#content-type-0>Content-Type</a> other
+  that the resource indicates that it does not wish to be cached.<p>If such a resource (with the correct MIME type) completes loading
+  (i.e. the entire HTTP response body is received or the connection
+  itself closes), the user agent should request the event source
+  resource again after a delay equal to the reconnection time of the
+  event source. This doesn't apply for the error cases that are listed
+  below.<p>HTTP 200 OK responses that have a <a href=#content-type-0>Content-Type</a> other
   than <code>text/event-stream</code> (or some other supported type),
   and HTTP responses whose Access-Control headers indicate that the
-  resource are not to be used, must be ignored and must prevent the
-  user agent from refetching the resource for that event source.<p>HTTP 201 Created, 202 Accepted, 203 Non-Authoritative
-  Information, and 206 Partial Content responses must be treated like
-  HTTP 200 OK responses for the purposes of reopening event source
-  resources. They are, however, likely to indicate an error has
-  occurred somewhere and may cause the user agent to emit a
-  warning.<p>HTTP 204 No Content, and 205 Reset Content responses must be
+  resource are not to be used, must be ignored.<p>HTTP 204 No Content, and 205 Reset Content responses must be
   treated as if they were 200 OK responses with the right MIME type
   but no content, and should therefore cause the user agent to refetch
   the resource after a delay equal to the reconnection time of the
-  event source.<p>HTTP 300 Multiple Choices responses should be handled
+  event source.<p>Other HTTP response codes in the 2xx range <!--201 Created, 202
+  Accepted, 203 Non-Authoritative Information, and 206 Partial
+  Content-->must be treated like HTTP 200 OK responses for the
+  purposes of reopening event source resources. They are, however,
+  likely to indicate an error has occurred somewhere and may cause the
+  user agent to emit a warning.<p>HTTP 300 Multiple Choices responses should be handled
   automatically if possible (treating the responses as if they were
   302 Found responses pointing to the appropriate resource), and
   otherwise must be treated as HTTP 404 responses.<p>HTTP 301 Moved Permanently responses must cause the user agent to
@@ -33114,17 +33115,16 @@
   new request should then be made after a delay equal to the
   reconnection time of the event source.<p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy
   Authentication Required should be treated transparently as for any
-  other subresource.<p>Any other HTTP response code not listed here should cause the
-  user agent to stop trying to process this event source.</p><!--
-  including: HTTP 400 Bad Request, 403 Forbidden, 404 Not Found, 405
-  Method Not Allowed, 406 Not Acceptable, 408 Request Timeout, 409
-  Conflict, 410 Gone, 411 Length Required, 412 Precondition Failed,
-  413 Request Entity Too Large, 414 Request-URI Too Long, 415
-  Unsupported Media Type, 416 Requested Range Not Satisfiable, 417
-  Expectation Failed, 500 Internal Server Error, 501 Not Implemented,
-  502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout, and
-  505 HTTP Version Not Supported responses --><p>DNS errors must be considered fatal, and cause the user agent to
-  not open any connection for that event source.<p>For non-HTTP protocols, UAs should act in equivalent ways.<h4 id=parsing-an-event-stream><span class=secno>7.2.3 </span>Parsing an event stream</h4><!-- XXX Wladimir Palant pointed out problems with HTTP chunking with server-sent-events --><p>This event stream format's MIME type is
+  other subresource.<p>Any other HTTP response code not listed here or network error
+  (e.g. DNS errors) must be ignored.</p><!-- including: HTTP 400 Bad
+  Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, 406
+  Not Acceptable, 408 Request Timeout, 409 Conflict, 410 Gone, 411
+  Length Required, 412 Precondition Failed, 413 Request Entity Too
+  Large, 414 Request-URI Too Long, 415 Unsupported Media Type, 416
+  Requested Range Not Satisfiable, 417 Expectation Failed, 500
+  Internal Server Error, 501 Not Implemented, 502 Bad Gateway, 503
+  Service Unavailable, 504 Gateway Timeout, and 505 HTTP Version Not
+  Supported responses --><p>For non-HTTP protocols, UAs should act in equivalent ways.<h4 id=parsing-an-event-stream><span class=secno>7.2.3 </span>Parsing an event stream</h4><!-- XXX Wladimir Palant pointed out problems with HTTP chunking with server-sent-events --><p>This event stream format's MIME type is
   <code>text/event-stream</code>.<p>The event stream format is (in pseudo-BNF):<pre>&lt;stream&gt;          ::= &lt;bom&gt;? &lt;event&gt;*
 &lt;event&gt;           ::= [ &lt;comment&gt; | &lt;field&gt; ]* &lt;newline&gt;
 &lt;comment&gt;         ::= &lt;colon&gt; &lt;any-char&gt;* &lt;newline&gt;
@@ -43283,8 +43283,9 @@
   Stuart Parmenter, Sunava Dutta, Tantek &Ccedil;elik, Terrence Wood,
   Thomas Broyer, Thomas O'Connor, Tim Altman, Tim Johansson, Travis
   Leithead, Tyler Close, Vladimir Vuki&#263;evi&#263;, Wakaba,
-  Wayne Pollock, William Swanson, Yi-An Huang, and &Oslash;istein
-  E. Andersen, for their useful and substantial comments.<p>Thanks also to everyone who has ever posted about HTML5 to their
+  Wayne Pollock, Wellington Fernando de Macedo, William Swanson, Yi-An
+  Huang, and &Oslash;istein E. Andersen, for their useful and
+  substantial comments.<p>Thanks also to everyone who has ever posted about HTML5 to their
   blogs, public mailing lists, or forums, including the <a href=http://lists.w3.org/Archives/Public/public-html/>W3C
   public-html list</a> and the <a href=http://www.whatwg.org/mailing-list>various WHATWG lists</a>.
Received on Tuesday, 21 October 2008 15:18:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:56 GMT