[html5] r6632 - [e] (0) Revert the part of r5409 that removed the URL parsing algorithms, since [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 4 18:55:22 PDT 2011


Author: ianh
Date: 2011-10-04 18:55:21 -0700 (Tue, 04 Oct 2011)
New Revision: 6632

Modified:
   complete.html
   index
   source
Log:
[e] (0) Revert the part of r5409 that removed the URL parsing algorithms, since it's no longer defined in the protocol spec.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13241

Modified: complete.html
===================================================================
--- complete.html	2011-10-05 00:04:34 UTC (rev 6631)
+++ complete.html	2011-10-05 01:55:21 UTC (rev 6632)
@@ -1066,8 +1066,9 @@
      <li><a href=#the-websocket-interface><span class=secno>11.3.2 </span>The <code>WebSocket</code> interface</a></li>
      <li><a href=#feedback-from-the-protocol><span class=secno>11.3.3 </span>Feedback from the protocol</a>
       <ol>
-       <li><a href=#event-definitions-3><span class=secno>11.3.3.1 </span>Event definitions</a></li>
-       <li><a href=#garbage-collection-2><span class=secno>11.3.3.2 </span>Garbage collection</a></ol></ol></li>
+       <li><a href=#parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</a></li>
+       <li><a href=#event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</a></li>
+       <li><a href=#garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</a></ol></ol></li>
    <li><a href=#web-messaging><span class=secno>11.4 </span>Cross-document messaging</a>
     <ol>
      <li><a href=#introduction-14><span class=secno>11.4.1 </span>Introduction</a></li>
@@ -4046,8 +4047,7 @@
     <p>The following terms are defined in the WebSocket protocol
     specification: <a href=#refsWSP>[WSP]</a></p>
 
-    <ul class=brief><li><dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn>
-     <li><dfn id=establish-a-websocket-connection>establish a WebSocket connection</dfn>
+    <ul class=brief><li><dfn id=establish-a-websocket-connection>establish a WebSocket connection</dfn>
      <li><dfn id=the-websocket-connection-is-established>the WebSocket connection is established</dfn>
      <li><dfn id="validate-the-server's-response">validate the server's response</dfn>
      <li><dfn id=extensions-in-use>extensions in use</dfn>
@@ -80977,8 +80977,70 @@
   source</dfn>.</p>
 
 
-  <h5 id=event-definitions-3><span class=secno>11.3.3.1 </span>Event definitions</h5>
+  <h5 id=parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</h5>
 
+  <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.</p>
+
+  <ol><li><p>If the <var title="">url</var> string is not an
+   <a href=#absolute-url>absolute URL</a>, then fail this algorithm.</li>
+
+   <li>
+
+    <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> string, with the <span>URL character
+    encoding</span> set to UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p> <!-- the URL character
+    encoding is used to escape the query component -->
+
+    <p class=note>It doesn't matter what it is resolved relative to,
+    since we already know it is an <a href=#absolute-url>absolute URL</a> at this
+    point.</p>
+
+   </li>
+
+   <li><p>If <var title="">url</var> does not have a <a href=#url-scheme title=url-scheme><scheme></a> component whose value,
+   when <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, 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 <a href=#url-fragment title=url-fragment><fragment></a> component, then fail
+   this algorithm.</li>
+
+   <li><p>If the <a href=#url-scheme title=url-scheme><scheme></a>
+   component of <var title="">url</var> is "<code title="">ws</code>",
+   set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme><scheme></a> 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 <a href=#url-host title=url-host><host></a> component of <var title="">url</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
+   lowercase</a>.</li> <!-- at this point this is
+   Punycode-encoded already -->
+
+   <li><p>If <var title="">url</var> has a <a href=#url-port title=url-port><port></a> 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
+   <a href=#url-path title=url-path><path></a> component (which might
+   be empty) of <var title="">url</var>.</li> <!-- at this point
+   this is UTF-8 encoded and %-escaped -->
+
+   <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 <a href=#url-query title=url-query><query></a> component, then append a
+   single U+003F QUESTION MARK character (?) to <var title="">resource
+   name</var>, followed by the value of the <a href=#url-query title=url-query><query></a> component.</li> <!-- at
+   this point this is UTF-8 encoded and %-escaped -->
+
+   <li><p>Return <var title="">host</var>, <var title="">port</var>,
+   <var title="">resource name</var>, and <var title="">secure</var>.</li>
+
+  </ol><h5 id=event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</h5>
+
   <pre class=idl>[Constructor(DOMString type, optional <a href=#closeeventinit>CloseEventInit</a> eventInitDict)]
 interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute boolean <a href=#dom-closeevent-wasclean title=dom-CloseEvent-wasClean>wasClean</a>;
@@ -81011,7 +81073,7 @@
 
 
 
-  <h5 id=garbage-collection-2><span class=secno>11.3.3.2 </span>Garbage collection</h5>
+  <h5 id=garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</h5>
 
   <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>

Modified: index
===================================================================
--- index	2011-10-05 00:04:34 UTC (rev 6631)
+++ index	2011-10-05 01:55:21 UTC (rev 6632)
@@ -1066,8 +1066,9 @@
      <li><a href=#the-websocket-interface><span class=secno>11.3.2 </span>The <code>WebSocket</code> interface</a></li>
      <li><a href=#feedback-from-the-protocol><span class=secno>11.3.3 </span>Feedback from the protocol</a>
       <ol>
-       <li><a href=#event-definitions-3><span class=secno>11.3.3.1 </span>Event definitions</a></li>
-       <li><a href=#garbage-collection-2><span class=secno>11.3.3.2 </span>Garbage collection</a></ol></ol></li>
+       <li><a href=#parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</a></li>
+       <li><a href=#event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</a></li>
+       <li><a href=#garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</a></ol></ol></li>
    <li><a href=#web-messaging><span class=secno>11.4 </span>Cross-document messaging</a>
     <ol>
      <li><a href=#introduction-14><span class=secno>11.4.1 </span>Introduction</a></li>
@@ -4046,8 +4047,7 @@
     <p>The following terms are defined in the WebSocket protocol
     specification: <a href=#refsWSP>[WSP]</a></p>
 
-    <ul class=brief><li><dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn>
-     <li><dfn id=establish-a-websocket-connection>establish a WebSocket connection</dfn>
+    <ul class=brief><li><dfn id=establish-a-websocket-connection>establish a WebSocket connection</dfn>
      <li><dfn id=the-websocket-connection-is-established>the WebSocket connection is established</dfn>
      <li><dfn id="validate-the-server's-response">validate the server's response</dfn>
      <li><dfn id=extensions-in-use>extensions in use</dfn>
@@ -80977,8 +80977,70 @@
   source</dfn>.</p>
 
 
-  <h5 id=event-definitions-3><span class=secno>11.3.3.1 </span>Event definitions</h5>
+  <h5 id=parsing-websocket-urls><span class=secno>11.3.3.1 </span>Parsing WebSocket URLs</h5>
 
+  <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.</p>
+
+  <ol><li><p>If the <var title="">url</var> string is not an
+   <a href=#absolute-url>absolute URL</a>, then fail this algorithm.</li>
+
+   <li>
+
+    <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> string, with the <span>URL character
+    encoding</span> set to UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p> <!-- the URL character
+    encoding is used to escape the query component -->
+
+    <p class=note>It doesn't matter what it is resolved relative to,
+    since we already know it is an <a href=#absolute-url>absolute URL</a> at this
+    point.</p>
+
+   </li>
+
+   <li><p>If <var title="">url</var> does not have a <a href=#url-scheme title=url-scheme><scheme></a> component whose value,
+   when <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, 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 <a href=#url-fragment title=url-fragment><fragment></a> component, then fail
+   this algorithm.</li>
+
+   <li><p>If the <a href=#url-scheme title=url-scheme><scheme></a>
+   component of <var title="">url</var> is "<code title="">ws</code>",
+   set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme><scheme></a> 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 <a href=#url-host title=url-host><host></a> component of <var title="">url</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
+   lowercase</a>.</li> <!-- at this point this is
+   Punycode-encoded already -->
+
+   <li><p>If <var title="">url</var> has a <a href=#url-port title=url-port><port></a> 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
+   <a href=#url-path title=url-path><path></a> component (which might
+   be empty) of <var title="">url</var>.</li> <!-- at this point
+   this is UTF-8 encoded and %-escaped -->
+
+   <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 <a href=#url-query title=url-query><query></a> component, then append a
+   single U+003F QUESTION MARK character (?) to <var title="">resource
+   name</var>, followed by the value of the <a href=#url-query title=url-query><query></a> component.</li> <!-- at
+   this point this is UTF-8 encoded and %-escaped -->
+
+   <li><p>Return <var title="">host</var>, <var title="">port</var>,
+   <var title="">resource name</var>, and <var title="">secure</var>.</li>
+
+  </ol><h5 id=event-definitions-3><span class=secno>11.3.3.2 </span>Event definitions</h5>
+
   <pre class=idl>[Constructor(DOMString type, optional <a href=#closeeventinit>CloseEventInit</a> eventInitDict)]
 interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute boolean <a href=#dom-closeevent-wasclean title=dom-CloseEvent-wasClean>wasClean</a>;
@@ -81011,7 +81073,7 @@
 
 
 
-  <h5 id=garbage-collection-2><span class=secno>11.3.3.2 </span>Garbage collection</h5>
+  <h5 id=garbage-collection-2><span class=secno>11.3.3.3 </span>Garbage collection</h5>
 
   <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>

Modified: source
===================================================================
--- source	2011-10-05 00:04:34 UTC (rev 6631)
+++ source	2011-10-05 01:55:21 UTC (rev 6632)
@@ -3001,7 +3001,6 @@
 
     <ul class="brief">
 
-     <li><dfn>parse a WebSocket URL's components</dfn>
      <li><dfn>establish a WebSocket connection</dfn>
      <li><dfn>the WebSocket connection is established</dfn>
      <li><dfn>validate the server's response</dfn>
@@ -91759,6 +91758,87 @@
   source</dfn>.</p>
 
 
+  <h5>Parsing WebSocket URLs</h5>
+
+  <p>The steps to <dfn>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.</p>
+
+  <ol>
+
+   <li><p>If the <var title="">url</var> string is not an
+   <span>absolute URL</span>, then fail this algorithm.</p></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> <!-- the URL character
+    encoding is used to escape the query component -->
+
+    <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"><scheme></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.</p></li>
+
+   <li><p>If <var title="">url</var> has a <span
+   title="url-fragment"><fragment></span> component, then fail
+   this algorithm.</p></li>
+
+   <li><p>If the <span title="url-scheme"><scheme></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"><scheme></span> component is "<code
+   title="">wss</code>", set <var title="">secure</var> to
+   true.</p></li>
+
+   <li><p>Let <var title="">host</var> be the value of the <span
+   title="url-host"><host></span> component of <var
+   title="">url</var>, <span>converted to ASCII
+   lowercase</span>.</p></li> <!-- at this point this is
+   Punycode-encoded already -->
+
+   <li><p>If <var title="">url</var> has a <span
+   title="url-port"><port></span> component, then let <var
+   title="">port</var> be that component's value; otherwise, there is
+   no explicit <var title="">port</var>.</p></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.</p></li>
+
+   <li><p>Let <var title="">resource name</var> be the value of the
+   <span title="url-path"><path></span> component (which might
+   be empty) of <var title="">url</var>.</p></li> <!-- at this point
+   this is UTF-8 encoded and %-escaped -->
+
+   <li><p>If <var title="">resource name</var> is the empty string,
+   set it to a single character U+002F SOLIDUS (/).</p></li>
+
+   <li><p>If <var title="">url</var> has a <span
+   title="url-query"><query></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"><query></span> component.</p></li> <!-- at
+   this point this is UTF-8 encoded and %-escaped -->
+
+   <li><p>Return <var title="">host</var>, <var title="">port</var>,
+   <var title="">resource name</var>, and <var
+   title="">secure</var>.</p></li>
+
+  </ol>
+
+
   <h5>Event definitions</h5>
 
   <pre class="idl">[Constructor(DOMString type, optional <span>CloseEventInit</span> eventInitDict)]




More information about the Commit-Watchers mailing list