Skip to content

Commit

Permalink
[giow] (1) EventSource: only allow text/event-stream with no paramete…
Browse files Browse the repository at this point in the history
…rs or with a charset=utf-8 parameter.

git-svn-id: http://svn.whatwg.org/webapps@6250 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 16, 2011
1 parent bdff94a commit 964579b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
25 changes: 14 additions & 11 deletions complete.html
Expand Up @@ -78952,13 +78952,15 @@ <h4 id=processing-model-5><span class=secno>11.2.3 </span>Processing model</h4>
must act as follows.</p>

<p>HTTP 200 OK responses with a <a href=#content-type>Content-Type</a> header
specifying the type <code><a href=#text/event-stream>text/event-stream</a></code> must be processed
line by line <a href=#event-stream-interpretation>as described
specifying the type <code><a href=#text/event-stream>text/event-stream</a></code>, either with no
parameters or with a single parameter whose name is "<code title="">charset</code>" and whose value is an <span>ASCII
case-insensitive match</span> for "UTF-8", must be processed line by
line <a href=#event-stream-interpretation>as described
below</a>.</p>

<p>When a successful response with a supported <a href=#mime-type>MIME type</a> is
received, such that the user agent begins parsing the contents of
the stream, the user agent must <a href=#announce-the-connection>announce the
<p>When a successful response with a supported <a href=#mime-type>MIME
type</a> is received, such that the user agent begins parsing the
contents of the stream, the user agent must <a href=#announce-the-connection>announce the
connection</a>.</p>

<p>The <a href=#concept-task title=concept-task>task</a> that the
Expand All @@ -78969,12 +78971,13 @@ <h4 id=processing-model-5><span class=secno>11.2.3 </span>Processing model</h4>
whether the connection is closed gracefully or unexpectedly. It
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
than <code><a href=#text/event-stream>text/event-stream</a></code> (or some other supported type),
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
is defined as having no MIME type; javascript: as having the type
text/html -->
<p>HTTP 200 OK responses that have a <a href=#content-type>Content-Type</a>
specifying an unsupported type (including the
<code><a href=#text/event-stream>text/event-stream</a></code> type with unsupported parameters or
parameters with unsupported values), 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 is defined as
having no MIME type; javascript: as having the type text/html -->

<p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy
Authentication Required should be treated transparently as for any
Expand Down
26 changes: 15 additions & 11 deletions source
Expand Up @@ -89500,13 +89500,16 @@ interface <dfn>EventSource</dfn> {
must act as follows.</p>

<p>HTTP 200 OK responses with a <span>Content-Type</span> header
specifying the type <code>text/event-stream</code> must be processed
line by line <a href="#event-stream-interpretation">as described
specifying the type <code>text/event-stream</code>, either with no
parameters or with a single parameter whose name is "<code
title="">charset</code>" and whose value is an <span>ASCII
case-insensitive match</span> for "UTF-8", must be processed line by
line <a href="#event-stream-interpretation">as described
below</a>.</p>

<p>When a successful response with a supported <span>MIME type</span> is
received, such that the user agent begins parsing the contents of
the stream, the user agent must <span>announce the
<p>When a successful response with a supported <span>MIME
type</span> is received, such that the user agent begins parsing the
contents of the stream, the user agent must <span>announce the
connection</span>.</p>

<p>The <span title="concept-task">task</span> that the
Expand All @@ -89517,12 +89520,13 @@ interface <dfn>EventSource</dfn> {
whether the connection is closed gracefully or unexpectedly. It
doesn't apply for the error conditions listed below.</p>

<p>HTTP 200 OK responses that have a <span>Content-Type</span> other
than <code>text/event-stream</code> (or some other supported type),
or that have no <span>Content-Type</span> at all, must cause the
user agent to <span>fail the connection</span>.</p> <!-- about:blank
is defined as having no MIME type; javascript: as having the type
text/html -->
<p>HTTP 200 OK responses that have a <span>Content-Type</span>
specifying an unsupported type (including the
<code>text/event-stream</code> type with unsupported parameters or
parameters with unsupported values), or that have no
<span>Content-Type</span> at all, must cause the user agent to
<span>fail the connection</span>.</p> <!-- about:blank is defined as
having no MIME type; javascript: as having the type text/html -->

<p>HTTP 305 Use Proxy, HTTP 401 Unauthorized, and 407 Proxy
Authentication Required should be treated transparently as for any
Expand Down

0 comments on commit 964579b

Please sign in to comment.