Skip to content

Commit

Permalink
[giow] (1) Make EventSource not reconnect for 2xx codes.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@5833 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 3, 2011
1 parent 7171d04 commit 5a59523
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 46 deletions.
41 changes: 18 additions & 23 deletions complete.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -73514,19 +73514,11 @@ <h4 id=processing-model-5><span class=secno>10.2.3 </span>Processing model</h4>
doesn't apply for the error conditions listed below.</p> doesn't apply for the error conditions listed below.</p>


<p>HTTP 200 OK responses that have a <a href=#content-type>Content-Type</a> other <p>HTTP 200 OK responses that have a <a href=#content-type>Content-Type</a> other
than <code><a href=#text/event-stream>text/event-stream</a></code> (or some other supported type) than <code><a href=#text/event-stream>text/event-stream</a></code> (or some other supported type),
must cause the user agent to <a href=#fail-the-connection>fail the connection</a>.</p> or that have no <a href=#content-type>Content-Type</a> at all, must cause the

user agent to <a href=#fail-the-connection>fail the connection</a>.</p> <!-- about:blank
<p>HTTP 204 No Content, and 205 Reset Content responses are is defined as having no MIME type; javascript: as having the type
equivalent to 200 OK responses with the right <a href=#mime-type>MIME type</a> text/html -->
but no content, and thus must <a href=#reestablish-the-connection>reestablish the
connection</a>.</p>

<p>Other HTTP response codes in the 2xx range <!--201 Created, 202
Accepted, 203 Non-Authoritative Information, and 206 Partial
Content-->must similarly <a href=#reestablish-the-connection>reestablish the connection</a>. They
are, however, likely to indicate an error has occurred somewhere and
may cause the user agent to emit a warning.</p>


<p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy <p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy
Authentication Required should be treated transparently as for any Authentication Required should be treated transparently as for any
Expand All @@ -73542,16 +73534,19 @@ <h4 id=processing-model-5><span class=secno>10.2.3 </span>Processing model</h4>
<p>Any other HTTP response code not listed here, and any network <p>Any other HTTP response code not listed here, and any network
error that prevents the HTTP connection from being established in error that prevents the HTTP connection from being established in
the first place (e.g. DNS errors), must cause the user agent to the first place (e.g. DNS errors), must cause the user agent to
<a href=#fail-the-connection>fail the connection</a>.</p> <!-- including: HTTP 300 <a href=#fail-the-connection>fail the connection</a>.</p> <!-- including: HTTP 201
Multiple Choices, HTTP 304 Not Modified, HTTP 400 Bad Request, 403 Created, HTTP 202 Accepted, HTTP 203 Non-Authoritative Information,
Forbidden, 404 Not Found, 405 Method Not Allowed, 406 Not HTTP 204 No Content, HTTP 205 Reset Content, HTTP 206 Partial
Acceptable, 408 Request Timeout, 409 Conflict, 410 Gone, 411 Length Content, HTTP 300 Multiple Choices, HTTP 304 Not Modified, HTTP 400
Required, 412 Precondition Failed, 413 Request Entity Too Large, 414 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed,
Request-URI Too Long, 415 Unsupported Media Type, 416 Requested 406 Not Acceptable, 408 Request Timeout, 409 Conflict, 410 Gone, 411
Range Not Satisfiable, 417 Expectation Failed, 500 Internal Server Length Required, 412 Precondition Failed, 413 Request Entity Too
Error, 501 Not Implemented, 502 Bad Gateway, 503 Service Large, 414 Request-URI Too Long, 415 Unsupported Media Type, 416
Unavailable, 504 Gateway Timeout, and 505 HTTP Version Not Supported Requested Range Not Satisfiable, 417 Expectation Failed, 500
responses --> Internal Server Error, 501 Not Implemented, 502 Bad Gateway, 503
Service Unavailable, 504 Gateway Timeout, and 505 HTTP Version Not
Supported responses --> <!-- mailto: is defined as equivalent to
HTTP 204 -->


<p>For non-HTTP protocols, UAs should act in equivalent ways.</p> <p>For non-HTTP protocols, UAs should act in equivalent ways.</p>


Expand Down
41 changes: 18 additions & 23 deletions source
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -83167,19 +83167,11 @@ interface <dfn>EventSource</dfn> {
doesn't apply for the error conditions listed below.</p> doesn't apply for the error conditions listed below.</p>


<p>HTTP 200 OK responses that have a <span>Content-Type</span> other <p>HTTP 200 OK responses that have a <span>Content-Type</span> other
than <code>text/event-stream</code> (or some other supported type) than <code>text/event-stream</code> (or some other supported type),
must cause the user agent to <span>fail the connection</span>.</p> or that have no <span>Content-Type</span> at all, must cause the

user agent to <span>fail the connection</span>.</p> <!-- about:blank
<p>HTTP 204 No Content, and 205 Reset Content responses are is defined as having no MIME type; javascript: as having the type
equivalent to 200 OK responses with the right <span>MIME type</span> text/html -->
but no content, and thus must <span>reestablish the
connection</span>.</p>

<p>Other HTTP response codes in the 2xx range <!--201 Created, 202
Accepted, 203 Non-Authoritative Information, and 206 Partial
Content-->must similarly <span>reestablish the connection</span>. They
are, however, likely to indicate an error has occurred somewhere and
may cause the user agent to emit a warning.</p>


<p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy <p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy
Authentication Required should be treated transparently as for any Authentication Required should be treated transparently as for any
Expand All @@ -83196,16 +83188,19 @@ interface <dfn>EventSource</dfn> {
<p>Any other HTTP response code not listed here, and any network <p>Any other HTTP response code not listed here, and any network
error that prevents the HTTP connection from being established in error that prevents the HTTP connection from being established in
the first place (e.g. DNS errors), must cause the user agent to the first place (e.g. DNS errors), must cause the user agent to
<span>fail the connection</span>.</p> <!-- including: HTTP 300 <span>fail the connection</span>.</p> <!-- including: HTTP 201
Multiple Choices, HTTP 304 Not Modified, HTTP 400 Bad Request, 403 Created, HTTP 202 Accepted, HTTP 203 Non-Authoritative Information,
Forbidden, 404 Not Found, 405 Method Not Allowed, 406 Not HTTP 204 No Content, HTTP 205 Reset Content, HTTP 206 Partial
Acceptable, 408 Request Timeout, 409 Conflict, 410 Gone, 411 Length Content, HTTP 300 Multiple Choices, HTTP 304 Not Modified, HTTP 400
Required, 412 Precondition Failed, 413 Request Entity Too Large, 414 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed,
Request-URI Too Long, 415 Unsupported Media Type, 416 Requested 406 Not Acceptable, 408 Request Timeout, 409 Conflict, 410 Gone, 411
Range Not Satisfiable, 417 Expectation Failed, 500 Internal Server Length Required, 412 Precondition Failed, 413 Request Entity Too
Error, 501 Not Implemented, 502 Bad Gateway, 503 Service Large, 414 Request-URI Too Long, 415 Unsupported Media Type, 416
Unavailable, 504 Gateway Timeout, and 505 HTTP Version Not Supported Requested Range Not Satisfiable, 417 Expectation Failed, 500
responses --> Internal Server Error, 501 Not Implemented, 502 Bad Gateway, 503
Service Unavailable, 504 Gateway Timeout, and 505 HTTP Version Not
Supported responses --> <!-- mailto: is defined as equivalent to
HTTP 204 -->


<p>For non-HTTP protocols, UAs should act in equivalent ways.</p> <p>For non-HTTP protocols, UAs should act in equivalent ways.</p>


Expand Down

0 comments on commit 5a59523

Please sign in to comment.