- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 10 Oct 2012 23:03:34 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/eventsource In directory hutz:/tmp/cvs-serv26528 Modified Files: Overview.html Log Message: Change EventSource so that it retries the connection in case of certain 5xx errors and in case of DNS errors or failed connections at the TCP level (whatwg r7450) Index: Overview.html =================================================================== RCS file: /sources/public/html5/eventsource/Overview.html,v retrieving revision 1.226 retrieving revision 1.227 diff -u -d -r1.226 -r1.227 --- Overview.html 10 Oct 2012 22:12:41 -0000 1.226 +++ Overview.html 10 Oct 2012 23:03:32 -0000 1.227 @@ -724,36 +724,33 @@ contents of the stream, the user agent must <a href="#announce-the-connection">announce the connection</a>.</p> - <p>The <span title="concept-task">task</span> that the - <span>networking task source</span> places on the <span>task - queue</span> once the <span title="fetch">fetching algorithm</span> - for such a resource (with the correct <span>MIME type</span>) has - completed must cause the user agent to asynchronously - <a href="#reestablish-the-connection">reestablish the connection</a>. This applies whether the - connection is closed gracefully or unexpectedly. It doesn't apply - for the error conditions listed below.</p> + <p>The <span title="concept-task">task</span> that the <span>networking task source</span> places + on the <span>task queue</span> once the <span title="fetch">fetching algorithm</span> for such a + resource (with the correct <span>MIME type</span>) has completed must cause the user agent to + asynchronously <a href="#reestablish-the-connection">reestablish the connection</a>. This applies whether the connection is + closed gracefully or unexpectedly. It doesn't apply for the error conditions listed below except + where explicitly specified.</p> - <p>HTTP 200 OK responses that have a <span>Content-Type</span> - specifying an unsupported type, or that have no - <span>Content-Type</span> at all, must cause the user agent to - <a href="#fail-the-connection">fail the connection</a>.</p> + <p>HTTP 200 OK responses that have a <span>Content-Type</span> specifying an unsupported type, or + that have no <span>Content-Type</span> at all, must cause the user agent to <a href="#fail-the-connection">fail the + connection</a>.</p> - <p>HTTP 305 Use Proxy, 401 Unauthorized, and 407 Proxy - Authentication Required should be treated transparently as for any - other subresource.</p> + <p>HTTP 305 Use Proxy, 401 Unauthorized, and 407 Proxy Authentication Required should be treated + transparently as for any other subresource.</p> - <p>HTTP 301 Moved Permanently, 302 Found, 303 See Other, and - 307 Temporary Redirect responses are handled by the <span title="fetch">fetching</span> and CORS algorithms. In the case of - 301 redirects, the user agent must also remember the new URL so that - subsequent requests for this resource for this - <code><a href="#eventsource">EventSource</a></code> object start with the URL given for the - last 301 seen for requests for this object.</p> + <p>HTTP 301 Moved Permanently, 302 Found, 303 See Other, and 307 Temporary Redirect responses are + handled by the <span title="fetch">fetching</span> and CORS algorithms. In the case of 301 + redirects, the user agent must also remember the new URL so that subsequent requests for this + resource for this <code><a href="#eventsource">EventSource</a></code> object start with the URL given for the last 301 seen + for requests for this object.</p> - <p>Any other HTTP response code not listed here, and any network - error that prevents the HTTP connection from being established in - the first place (e.g. DNS errors), must cause the user agent to - <a href="#fail-the-connection">fail the connection</a>.</p> - + <p>HTTP 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, and 504 Gateway + Timeout responses, and any network error that prevents the connection from being established in + the first place (e.g. DNS errors), must cause the user agent to asynchronously <a href="#reestablish-the-connection">reestablish + the connection</a>.</p> + + <p>Any other HTTP response code not listed here must cause the user agent to <a href="#fail-the-connection">fail the + connection</a>.</p> <p>For non-HTTP protocols, UAs should act in equivalent ways.</p> @@ -788,6 +785,12 @@ <li><p>Wait a delay equal to the reconnection time of the event source.</li> + <li><p>Optionally, wait some more. In particular, if the previous attempt failed, then user + agents might introduce an exponential backoff delay to avoid overloading a potentially already + overloaded server. Alternatively, if the operating system has reported that there is no network + connectivity, user agents might wait for the operating system to announce that the network + connection has returned before retrying.</li> + <li><p>Wait until the aforementioned task has run, if it has not yet run.</li>
Received on Wednesday, 10 October 2012 23:03:36 UTC