[html5] r8232 - [giow] (2) Make sure WebSocket connections that can't honour the subprotocol don [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Oct 21 10:10:38 PDT 2013


Author: ianh
Date: 2013-10-21 10:10:25 -0700 (Mon, 21 Oct 2013)
New Revision: 8232

Modified:
   complete.html
   index
   source
Log:
[giow] (2) Make sure WebSocket connections that can't honour the subprotocol don't get established (looks like this got broken in the protocol spec at some point)
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23576
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2013-10-18 20:52:38 UTC (rev 8231)
+++ complete.html	2013-10-21 17:10:25 UTC (rev 8232)
@@ -256,7 +256,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 18 October 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 21 October 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -78682,6 +78682,9 @@
    <li><p>Return a new <code><a href=#websocket>WebSocket</a></code> object, but continue these steps
    asynchronously.</li>
 
+   <li><p>Let the new object's <dfn id=client-specified-protocols>client-specified protocols</dfn> be the values (if any) given in
+   <var title="">protocols</var>.</li>
+
    <li>
 
     <p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along with
@@ -78986,7 +78989,12 @@
   <p>When <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, the user agent must <a href=#queue-a-task>queue a
   task</a> to run these steps:</p>
 
-  <ol><li><p>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value to
+  <ol><li><p>If the <code><a href=#websocket>WebSocket</a></code> object's <a href=#client-specified-protocols>client-specified protocols</a> was not an
+   empty list, but the <i><a href=#subprotocol-in-use>subprotocol in use</a></i> is the null value, then <i><a href=#fail-the-websocket-connection>fail the WebSocket
+   connection</a></i>, set the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's
+   value to <code title=dom-WebSocket-CLOSING><a href=#dom-websocket-closing>CLOSING</a></code> (2), and abort these steps. <a href=#refsWSP>[WSP]</a></li>
+
+   <li><p>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value to
    <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code> (1).</li>
 
    <li><p>Change the <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute's value to

Modified: index
===================================================================
--- index	2013-10-18 20:52:38 UTC (rev 8231)
+++ index	2013-10-21 17:10:25 UTC (rev 8232)
@@ -256,7 +256,7 @@
 
   <header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 18 October 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 21 October 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -78682,6 +78682,9 @@
    <li><p>Return a new <code><a href=#websocket>WebSocket</a></code> object, but continue these steps
    asynchronously.</li>
 
+   <li><p>Let the new object's <dfn id=client-specified-protocols>client-specified protocols</dfn> be the values (if any) given in
+   <var title="">protocols</var>.</li>
+
    <li>
 
     <p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along with
@@ -78986,7 +78989,12 @@
   <p>When <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, the user agent must <a href=#queue-a-task>queue a
   task</a> to run these steps:</p>
 
-  <ol><li><p>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value to
+  <ol><li><p>If the <code><a href=#websocket>WebSocket</a></code> object's <a href=#client-specified-protocols>client-specified protocols</a> was not an
+   empty list, but the <i><a href=#subprotocol-in-use>subprotocol in use</a></i> is the null value, then <i><a href=#fail-the-websocket-connection>fail the WebSocket
+   connection</a></i>, set the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's
+   value to <code title=dom-WebSocket-CLOSING><a href=#dom-websocket-closing>CLOSING</a></code> (2), and abort these steps. <a href=#refsWSP>[WSP]</a></li>
+
+   <li><p>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value to
    <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code> (1).</li>
 
    <li><p>Change the <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute's value to

Modified: source
===================================================================
--- source	2013-10-18 20:52:38 UTC (rev 8231)
+++ source	2013-10-21 17:10:25 UTC (rev 8232)
@@ -88170,6 +88170,9 @@
    <li><p>Return a new <code>WebSocket</code> object, but continue these steps
    asynchronously.</p></li>
 
+   <li><p>Let the new object's <dfn>client-specified protocols</dfn> be the values (if any) given in
+   <var data-x="">protocols</var>.</p></li>
+
    <li>
 
     <p><i>Establish a WebSocket connection</i> given the set (<var data-x="">host</var>, <var
@@ -88542,6 +88545,12 @@
 
   <ol>
 
+   <li><p>If the <code>WebSocket</code> object's <span>client-specified protocols</span> was not an
+   empty list, but the <i>subprotocol in use</i> is the null value, then <i>fail the WebSocket
+   connection</i>, set the <code data-x="dom-WebSocket-readyState">readyState</code> attribute's
+   value to <code data-x="dom-WebSocket-CLOSING">CLOSING</code> (2), and abort these steps. <a
+   href="#refsWSP">[WSP]</a></p></li>
+
    <li><p>Change the <code data-x="dom-WebSocket-readyState">readyState</code> attribute's value to
    <code data-x="dom-WebSocket-OPEN">OPEN</code> (1).</p></li>
 




More information about the Commit-Watchers mailing list