Skip to content

Commit

Permalink
[giow] (0) Prevent API from sending too much data to the protocol for…
Browse files Browse the repository at this point in the history
… the close frame.

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

git-svn-id: http://svn.whatwg.org/webapps@6269 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 21, 2011
1 parent 9d408ec commit eaa8784
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
10 changes: 7 additions & 3 deletions complete.html
Expand Up @@ -79800,6 +79800,11 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
<code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
steps.</li>

<li><p>If the method's second argument is present, then let <var title="">reason</var> be the result of encoding that argument as
UTF-8. If <var title="">reason</var> is longer than 123 bytes, then
throw an <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and abort these steps.
<a href=#refsRFC3629>[RFC3629]</a></li>

<li><p>Run the first matching steps from the following list:</p>

<dl class=switch><dt>If the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code>
Expand Down Expand Up @@ -79846,9 +79851,8 @@ <h4 id=the-websocket-interface><span class=secno>11.3.2 </span>The <code><a href
code<!--CLOSE CODE--> to use in the WebSocket Close message must
be the integer given by the first argument. <a href=#refsWSP>[WSP]</a></p>

<p>If the second argument is also present, then it must be
encoded as UTF-8 and provided in the Close message after the
status code<!--CLOSE CODE-->. <a href=#refsRFC3629>[RFC3629]</a> <a href=#refsWSP>[WSP]</a></p>
<p>If the second argument is also present, then <var title="">reason</var> must be provided in the Close message
after the status code<!--CLOSE CODE-->. <a href=#refsRFC3629>[RFC3629]</a> <a href=#refsWSP>[WSP]</a></p>

<p class=note>The <i><a href=#start-the-websocket-closing-handshake>start the WebSocket closing handshake</a></i>
algorithm eventually invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
Expand Down
15 changes: 11 additions & 4 deletions source
Expand Up @@ -90462,6 +90462,12 @@ interface <dfn>WebSocket</dfn> {
<code>INVALID_ACCESS_ERR</code> exception and abort these
steps.</p></li>

<li><p>If the method's second argument is present, then let <var
title="">reason</var> be the result of encoding that argument as
UTF-8. If <var title="">reason</var> is longer than 123 bytes, then
throw an <code>SYNTAX_ERR</code> exception and abort these steps.
<a href="#refsRFC3629">[RFC3629]</a></p></li>

<li><p>Run the first matching steps from the following list:</p>

<dl class="switch">
Expand Down Expand Up @@ -90521,10 +90527,11 @@ interface <dfn>WebSocket</dfn> {
be the integer given by the first argument. <a
href="#refsWSP">[WSP]</a></p>

<p>If the second argument is also present, then it must be
encoded as UTF-8 and provided in the Close message after the
status code<!--CLOSE CODE-->. <a
href="#refsRFC3629">[RFC3629]</a> <a href="#refsWSP">[WSP]</a></p>
<p>If the second argument is also present, then <var
title="">reason</var> must be provided in the Close message
after the status code<!--CLOSE CODE-->. <a
href="#refsRFC3629">[RFC3629]</a> <a
href="#refsWSP">[WSP]</a></p>

<p class="note">The <i>start the WebSocket closing handshake</i>
algorithm eventually invokes the <i>close the WebSocket
Expand Down

0 comments on commit eaa8784

Please sign in to comment.