[html5] r3192 - [] (0) Define the WebSocket protocol in more detail for servers.

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 4 17:33:39 PDT 2009


Author: ianh
Date: 2009-06-04 17:33:37 -0700 (Thu, 04 Jun 2009)
New Revision: 3192

Modified:
   index
   source
Log:
[] (0) Define the WebSocket protocol in more detail for servers.

Modified: index
===================================================================
--- index	2009-06-04 23:42:54 UTC (rev 3191)
+++ index	2009-06-05 00:33:37 UTC (rev 3192)
@@ -39,7 +39,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 4 June 2009</h2>
+   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 5 June 2009</h2>
    <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>
    <dl><dt>Multiple-page version:</dt>

Modified: source
===================================================================
--- source	2009-06-04 23:42:54 UTC (rev 3191)
+++ source	2009-06-05 00:33:37 UTC (rev 3192)
@@ -70844,8 +70844,9 @@
 
   <p>Send another CRLF pair (0x0d 0x0a).</p>
 
-  <p>Read (and discard) data from the client until four bytes 0x0d
-  0x0a 0x0d 0x0a are read.</p>
+  <p>Read data from the client until four bytes 0x0d 0x0a 0x0d 0x0a
+  are read. This data must either be discarded or handled as described
+  in the following section describing the handshake details.</p>
 
   <p>If the connection isn't dropped at this point, go to the <a
   href="#ws-sd-framing">data framing</a> section.</p>
@@ -70867,6 +70868,12 @@
   title="">WebSocket-Location</code> line (after the appropriate
   scheme and host).</p>
 
+  <p>If the first field does not have three tokens, the server should
+  abort the connection as it probably represents an errorneous
+  client.</p>
+
+  <hr>
+
   <p>The remaining fields consist of name-value pairs, with the name
   part separated from the value part by a colon and a space (bytes
   0x3a 0x20). Of these, several are interesting:</p>
@@ -70920,7 +70927,10 @@
 
   </dl>
 
+  <p>Any fields that lack the colon-space separator should be
+  discarded and may cause the server to disconnect.</p>
 
+
   <h6 id="ws-sd-framing">Data framing</h6>
 
   <p class="note">This section only describes how to handle content
@@ -70929,14 +70939,14 @@
   requirements on user agents defined earlier handle any content
   including possible future extensions to the protocols.</p>
 
-  <p>The server should run through the following steps to process the
+  <p>The server must run through the following steps to process the
   bytes sent by the client:</p>
 
   <ol>
 
    <li><p>Read a byte from the client. Assuming everything is going
-   according to plan, it will be a 0x00 byte. Behavior for the server
-   is undefined if the byte is not 0x00.</p></li>
+   according to plan, it will be a 0x00 byte. If the byte is not a
+   0x00 byte, then the server may disconnect.</p></li>
 
    <li><p>Let <var title="">raw data</var> be an empty byte
    array.</p></li>
@@ -70949,7 +70959,7 @@
    previous step (labeled <a href="#ws-sd-data"><i>data</i></a>).</p></li>
 
    <li><p>Interpret <var title="">raw data</var> as a UTF-8 string,
-   and apply whatever server-specific processing should occur for the
+   and apply whatever server-specific processing is to occur for the
    resulting string.</p>
 
    <li><p>Return to the first step to read the next byte.</p></li>
@@ -70958,7 +70968,7 @@
 
   <hr>
 
-  <p>The server should run through the following steps to send strings
+  <p>The server must run through the following steps to send strings
   to the client:</p>
 
   <ol>




More information about the Commit-Watchers mailing list