[html5] r4154 - [e] (1) WebSocket: Try to improve clarity.

whatwg at whatwg.org whatwg at whatwg.org
Fri Oct 16 19:03:34 PDT 2009


Author: ianh
Date: 2009-10-16 19:03:32 -0700 (Fri, 16 Oct 2009)
New Revision: 4154

Modified:
   complete.html
   index
   source
Log:
[e] (1) WebSocket: Try to improve clarity.

Modified: complete.html
===================================================================
--- complete.html	2009-10-16 20:59:20 UTC (rev 4153)
+++ complete.html	2009-10-17 02:03:32 UTC (rev 4154)
@@ -110,7 +110,7 @@
 
   <header class=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 16 October 2009</h2>
+    <h2 class="no-num no-toc">Draft Standard — 17 October 2009</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -65858,6 +65858,27 @@
 WebSocket-Location: ws://example.com/demo
 WebSocket-Protocol: sample</pre>
 
+  <p>The first three lines in each case are hard-coded (the exact case
+  and order matters); the remainder are an unordered <a href=#ascii-case-insensitive>ASCII
+  case-insensitive</a> set of fields, one per line, that match the
+  following non-normative ABNF:
+  <a href=#refsABNF>[ABNF]</a>
+
+  </p>
+
+  <pre>field         = 1*name-char colon [ space ] *any-char cr lf
+colon         = %x003A ; U+003A COLON (:)
+space         = %x0020 ; U+0020 SPACE
+cr            = %x000D ; U+000D CARRIAGE RETURN (CR)
+lf            = %x000A ; U+000A LINE FEED (LF)
+name-char     = %x0000-0009 / %x000B-000C / %x000E-0039 / %x003B-10FFFF
+                ; a Unicode character other than U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR), or U+003A COLON (:)
+any-char      = %x0000-0009 / %x000B-000C / %x000E-10FFFF
+                ; a Unicode character other than U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)</pre>
+
+  <p>Lines that don't match the above production cause the connection
+  to be aborted.</p>
+
   <p>Once the client and server have both sent their handshakes, and
   if the handshake was successful, then the data transfer part
   starts. This is a two-way communication channel where each side can,
@@ -66328,6 +66349,12 @@
     "HTTP/1.1 101 Web Socket Protocol Handshake"
     followed by a CRLF pair.</p>
 
+    <p class=note>Note that this means that if a server responds
+    with a Web Socket handshake but with the string "HTTP/1.0" or
+    "HTTP/1.2" at the front, a normal Web Socket connection will not
+    be established.</p> <!-- we might update this as HTTP is updated,
+    depending on whether it remains compatible or whatnot -->
+
     <p>Otherwise, let <var title="">code</var> be the substring of
     <var title="">header</var> that starts from the byte after the
     first 0x20 byte, and ends with the byte before the second 0x20
@@ -85512,6 +85539,7 @@
   Алексей Проскуряков (Alexey Proskuryakov),
   Alexis Deveria,
   Allan Clements,
+  Amos Jeffries,
   Anders Carlsson,
   Andreas<!-- mqmq87 -->,
   Andrei Popescu,

Modified: index
===================================================================
--- index	2009-10-16 20:59:20 UTC (rev 4153)
+++ index	2009-10-17 02:03:32 UTC (rev 4154)
@@ -111,7 +111,7 @@
 
   <header class=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>HTML5</h1>
-    <h2 class="no-num no-toc">Draft Standard — 16 October 2009</h2>
+    <h2 class="no-num no-toc">Draft Standard — 17 October 2009</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -76538,6 +76538,7 @@
   Алексей Проскуряков (Alexey Proskuryakov),
   Alexis Deveria,
   Allan Clements,
+  Amos Jeffries,
   Anders Carlsson,
   Andreas<!-- mqmq87 -->,
   Andrei Popescu,

Modified: source
===================================================================
--- source	2009-10-16 20:59:20 UTC (rev 4153)
+++ source	2009-10-17 02:03:32 UTC (rev 4154)
@@ -74003,6 +74003,30 @@
 WebSocket-Location: ws://example.com/demo
 WebSocket-Protocol: sample</pre>
 
+  <p>The first three lines in each case are hard-coded (the exact case
+  and order matters); the remainder are an unordered <span>ASCII
+  case-insensitive</span> set of fields, one per line, that match the
+  following non-normative ABNF:
+<!--END complete-->
+  <a href="#refsRFC5234">[RFC5234]</a>
+<!--START complete--><!--END websocket-protocol-->
+  <a href="#refsABNF">[ABNF]</a>
+<!--START websocket-protocol-->
+  </p>
+
+  <pre>field         = 1*name-char colon [ space ] *any-char cr lf
+colon         = %x003A ; U+003A COLON (:)
+space         = %x0020 ; U+0020 SPACE
+cr            = %x000D ; U+000D CARRIAGE RETURN (CR)
+lf            = %x000A ; U+000A LINE FEED (LF)
+name-char     = %x0000-0009 / %x000B-000C / %x000E-0039 / %x003B-10FFFF
+                ; a Unicode character other than U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR), or U+003A COLON (:)
+any-char      = %x0000-0009 / %x000B-000C / %x000E-10FFFF
+                ; a Unicode character other than U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)</pre>
+
+  <p>Lines that don't match the above production cause the connection
+  to be aborted.</p>
+
   <p>Once the client and server have both sent their handshakes, and
   if the handshake was successful, then the data transfer part
   starts. This is a two-way communication channel where each side can,
@@ -74548,6 +74572,12 @@
     "HTTP/1.1 101 Web Socket Protocol Handshake"
     followed by a CRLF pair.</p>
 
+    <p class="note">Note that this means that if a server responds
+    with a Web Socket handshake but with the string "HTTP/1.0" or
+    "HTTP/1.2" at the front, a normal Web Socket connection will not
+    be established.</p> <!-- we might update this as HTTP is updated,
+    depending on whether it remains compatible or whatnot -->
+
     <p>Otherwise, let <var title="">code</var> be the substring of
     <var title="">header</var> that starts from the byte after the
     first 0x20 byte, and ends with the byte before the second 0x20
@@ -94303,6 +94333,7 @@
   Алексей Проскуряков (Alexey Proskuryakov),
   Alexis Deveria,
   Allan Clements,
+  Amos Jeffries,
   Anders Carlsson,
   Andreas<!-- mqmq87 -->,
   Andrei Popescu,




More information about the Commit-Watchers mailing list