W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2011

html5/websockets Overview.html,1.246,1.247

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 05 Oct 2011 01:58:23 +0000
To: public-html-commits@w3.org
Message-Id: <E1RBGkZ-0002QK-SH@lionel-hutz.w3.org>
Update of /sources/public/html5/websockets
In directory hutz:/tmp/cvs-serv9302

Modified Files:
	Overview.html 
Log Message:
Revert the part of r5409 that removed the URL parsing algorithms, since it's no longer defined in the protocol spec. (whatwg r6632)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/websockets/Overview.html,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- Overview.html	4 Oct 2011 17:01:19 -0000	1.246
+++ Overview.html	5 Oct 2011 01:58:21 -0000	1.247
@@ -215,7 +215,7 @@
 
    <h1>The WebSocket API</h1>
    
-   <h2 class="no-num no-toc" id="editor-s-draft-4-october-2011">Editor's Draft 4 October 2011</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-5-october-2011">Editor's Draft 5 October 2011</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/websockets/">http://www.w3.org/TR/websockets/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -319,7 +319,7 @@
   </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications
   Working Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation track.
-  This specification is the 4 October 2011 Editor's Draft.
+  This specification is the 5 October 2011 Editor's Draft.
   <p>This specification is being developed in conjunction with an
   Internet Draft for a wire protocol, the WebSocket Protocol,
   available from the following location:<ul><li>WebSocket Protocol Internet-Draft: <a href="http://www.whatwg.org/specs/web-socket-protocol/">http://www.whatwg.org/specs/web-socket-protocol/</a></li>
@@ -347,8 +347,9 @@
  <li><a href="#the-websocket-interface"><span class="secno">4 </span>The <code>WebSocket</code> interface</a></li>
  <li><a href="#feedback-from-the-protocol"><span class="secno">5 </span>Feedback from the protocol</a>
   <ol>
-   <li><a href="#event-definitions"><span class="secno">5.1 </span>Event definitions</a></li>
-   <li><a href="#garbage-collection"><span class="secno">5.2 </span>Garbage collection</a></ol></li>
+   <li><a href="#parsing-websocket-urls"><span class="secno">5.1 </span>Parsing WebSocket URLs</a></li>
+   <li><a href="#event-definitions"><span class="secno">5.2 </span>Event definitions</a></li>
+   <li><a href="#garbage-collection"><span class="secno">5.3 </span>Garbage collection</a></ol></li>
  <li><a class="no-num" href="#references">References</a></li>
  <li><a class="no-num" href="#acknowledgements">Acknowledgements</a></ol>
 <hr><h2 id="network-intro"><span class="secno">1 </span>Introduction</h2><p><i>This section is non-normative.</i><p>To enable Web applications to maintain bidirectional
@@ -449,7 +450,7 @@
   subprotocols. The subprotocol names must all be strings that match
   the requirements for elements that comprise the value of <code title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code>
   header fields as defined by the WebSocket protocol specification. <a href="#refsWSP">[WSP]</a><p>When the <code>WebSocket()</code> constructor is invoked, the UA
-  must run these steps:<ol><li><p><i>Parse a WebSocket URL's components</i> from the <var title="">url</var> argument, to obtain <var title="">host</var>,
+  must run these steps:<ol><li><p><i><a href="#parse-a-websocket-url-s-components">Parse a WebSocket URL's components</a></i> from the <var title="">url</var> argument, to obtain <var title="">host</var>,
    <var title="">port</var>, <var title="">resource name</var>, and
    <var title="">secure</var>. If this fails, throw a
    <code>SyntaxError</code> exception and abort these steps. <a href="#refsWSP">[WSP]</a></li>
@@ -890,7 +891,57 @@
 
   </ol><p>The <span>task source</span> for all <span title="concept-task">tasks</span> <span title="queue a
   task">queued</span> in this section is the <dfn id="websocket-task-source">WebSocket task
-  source</dfn>.<h3 id="event-definitions"><span class="secno">5.1 </span>Event definitions</h3><pre class="idl">[Constructor(DOMString type, optional <a href="#closeeventinit">CloseEventInit</a> eventInitDict)]
+  source</dfn>.<h3 id="parsing-websocket-urls"><span class="secno">5.1 </span>Parsing WebSocket URLs</h3><p>The steps to <dfn id="parse-a-websocket-url-s-components">parse a WebSocket URL's components</dfn> from
+  a string <var title="">url</var> are as follows. These steps return
+  either a <var title="">host</var>, a <var title="">port</var>, a
+  <var title="">resource name</var>, and a <var title="">secure</var>
+  flag, or they fail.<ol><li><p>If the <var title="">url</var> string is not an
+   <span>absolute URL</span>, then fail this algorithm.</li>
+
+   <li>
+
+    <p><span title="resolve a url">Resolve</span> the <var title="">url</var> string, with the <span>URL character
+    encoding</span> set to UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p> 
+    <p class="note">It doesn't matter what it is resolved relative to,
+    since we already know it is an <span>absolute URL</span> at this
+    point.</p>
+
+   </li>
+
+   <li><p>If <var title="">url</var> does not have a <span title="url-scheme">&lt;scheme&gt;</span> component whose value,
+   when <span>converted to ASCII lowercase</span>, is either "<code title="">ws</code>" or "<code title="">wss</code>", then fail this
+   algorithm.</li>
+
+   <li><p>If <var title="">url</var> has a <span title="url-fragment">&lt;fragment&gt;</span> component, then fail
+   this algorithm.</li>
+
+   <li><p>If the <span title="url-scheme">&lt;scheme&gt;</span>
+   component of <var title="">url</var> is "<code title="">ws</code>",
+   set <var title="">secure</var> to false; otherwise, the <span title="url-scheme">&lt;scheme&gt;</span> component is "<code title="">wss</code>", set <var title="">secure</var> to
+   true.</li>
+
+   <li><p>Let <var title="">host</var> be the value of the <span title="url-host">&lt;host&gt;</span> component of <var title="">url</var>, <span>converted to ASCII
+   lowercase</span>.</li> 
+   <li><p>If <var title="">url</var> has a <span title="url-port">&lt;port&gt;</span> component, then let <var title="">port</var> be that component's value; otherwise, there is
+   no explicit <var title="">port</var>.</li>
+
+   <li><p>If there is no explicit <var title="">port</var>, then: if
+   <var title="">secure</var> is false, let <var title="">port</var>
+   be 80, otherwise let <var title="">port</var> be 443.</li>
+
+   <li><p>Let <var title="">resource name</var> be the value of the
+   <span title="url-path">&lt;path&gt;</span> component (which might
+   be empty) of <var title="">url</var>.</li> 
+   <li><p>If <var title="">resource name</var> is the empty string,
+   set it to a single character U+002F SOLIDUS (/).</li>
+
+   <li><p>If <var title="">url</var> has a <span title="url-query">&lt;query&gt;</span> component, then append a
+   single U+003F QUESTION MARK character (?) to <var title="">resource
+   name</var>, followed by the value of the <span title="url-query">&lt;query&gt;</span> component.</li> 
+   <li><p>Return <var title="">host</var>, <var title="">port</var>,
+   <var title="">resource name</var>, and <var title="">secure</var>.</li>
+
+  </ol><h3 id="event-definitions"><span class="secno">5.2 </span>Event definitions</h3><pre class="idl">[Constructor(DOMString type, optional <a href="#closeeventinit">CloseEventInit</a> eventInitDict)]
 interface <dfn id="closeevent">CloseEvent</dfn> : <span>Event</span> {
   readonly attribute boolean <a href="#dom-closeevent-wasclean" title="dom-CloseEvent-wasClean">wasClean</a>;
   readonly attribute unsigned short <a href="#dom-closeevent-code" title="dom-CloseEvent-code">code</a>;
@@ -912,7 +963,7 @@
   attribute must return the value it was initialized to. When the
   object is created, this attribute must be initialized to empty
   string. It represents the WebSocket connection close reason provided
-  by the server.<h3 id="garbage-collection"><span class="secno">5.2 </span>Garbage collection</h3><p>A <code><a href="#websocket">WebSocket</a></code> object whose <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
+  by the server.<h3 id="garbage-collection"><span class="secno">5.3 </span>Garbage collection</h3><p>A <code><a href="#websocket">WebSocket</a></code> object whose <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
   was set to <code title="dom-WebSocket-CONNECTING"><a href="#dom-websocket-connecting">CONNECTING</a></code>
   (0) as of the last time the <span>event loop</span> started
   executing a <span title="concept-task">task</span> must not be
Received on Wednesday, 5 October 2011 01:58:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 5 October 2011 01:58:27 GMT