[html5] r1849 - [] (0) Make the Web Socket Protocol handshake more unique. (Re: websocket HTTP r [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Jul 7 02:17:53 PDT 2008
Author: ianh
Date: 2008-07-07 02:17:51 -0700 (Mon, 07 Jul 2008)
New Revision: 1849
Modified:
index
source
Log:
[] (0) Make the Web Socket Protocol handshake more unique. (Re: websocket HTTP response parsing) (credit: pt, jr)
Modified: index
===================================================================
--- index 2008-07-06 00:08:49 UTC (rev 1848)
+++ index 2008-07-07 09:17:51 UTC (rev 1849)
@@ -25,7 +25,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft>Draft Recommendation — 6 July
+ <h2 class="no-num no-toc" id=draft>Draft Recommendation — 7 July
2008</h2>
<p>You can take part in this work. <a
@@ -41618,21 +41618,22 @@
<p class=note>Just a CRLF (a blank line).</p>
<li>
- <p>Read the first 75 bytes from the server. If the connection closes
- before 75 bytes are received, or if the first 75 bytes aren't exactly
+ <p>Read the first 85 bytes from the server. If the connection closes
+ before 85 bytes are received, or if the first 85 bytes aren't exactly
equal to the following bytes, then <a href="#fail-the">fail the Web
Socket connection</a> and abort these steps.</p>
- <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 53 77 69
-74 63 68 69 6e 67 20 50 72 6f 74 6f 63 6f 6c 73
-0d 0a 55 70 67 72 61 64 65 3a 20 57 65 62 53 6f
-63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e
-3a 20 55 70 67 72 61 64 65 0d 0a</pre>
+ <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 57 65 62
+20 53 6f 63 6b 65 74 20 50 72 6f 74 6f 63 6f 6c
+20 48 61 6e 64 73 68 61 6b 65 0d 0a 55 70 67 72
+61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a
+43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72
+61 64 65 0d 0a</pre>
<p class=note>The string
- "HTTP/1.1 101 Switching Protocols", CRLF, the string
- "Upgrade: WebSocket", CRLF, the string "Connection: Upgrade",
- CRLF.</p>
+ "HTTP/1.1 101 Web Socket Protocol Handshake",
+ CRLF, the string "Upgrade: WebSocket", CRLF, the string
+ "Connection: Upgrade", CRLF.</p>
<p class=big-issue>What if the response is a 401 asking for credentials?</p>
@@ -41956,11 +41957,12 @@
<p>Listen on a port for TCP/IP. Upon receiving a connection request, open a
connection and send the following bytes back to the client:
- <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 53 77 69
-74 63 68 69 6e 67 20 50 72 6f 74 6f 63 6f 6c 73
-0d 0a 55 70 67 72 61 64 65 3a 20 57 65 62 53 6f
-63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e
-3a 20 55 70 67 72 61 64 65 0d 0a</pre>
+ <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 57 65 62
+20 53 6f 63 6b 65 74 20 50 72 6f 74 6f 63 6f 6c
+20 48 61 6e 64 73 68 61 6b 65 0d 0a 55 70 67 72
+61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a
+43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72
+61 64 65 0d 0a</pre>
<p>Send the string "<code title="">WebSocket-Origin</code>" followed by a
U+003A COLON (":") followed by the <a href="#ascii" title="ASCII
Modified: source
===================================================================
--- source 2008-07-06 00:08:49 UTC (rev 1848)
+++ source 2008-07-07 09:17:51 UTC (rev 1849)
@@ -39200,19 +39200,20 @@
<li>
- <p>Read the first 75 bytes from the server. If the connection
- closes before 75 bytes are received, or if the first 75 bytes
+ <p>Read the first 85 bytes from the server. If the connection
+ closes before 85 bytes are received, or if the first 85 bytes
aren't exactly equal to the following bytes, then <span>fail the
Web Socket connection</span> and abort these steps.</p>
- <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 53 77 69
-74 63 68 69 6e 67 20 50 72 6f 74 6f 63 6f 6c 73
-0d 0a 55 70 67 72 61 64 65 3a 20 57 65 62 53 6f
-63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e
-3a 20 55 70 67 72 61 64 65 0d 0a</pre>
+ <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 57 65 62
+20 53 6f 63 6b 65 74 20 50 72 6f 74 6f 63 6f 6c
+20 48 61 6e 64 73 68 61 6b 65 0d 0a 55 70 67 72
+61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a
+43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72
+61 64 65 0d 0a</pre>
<p class="note">The string
- "HTTP/1.1 101 Switching Protocols", CRLF, the
+ "HTTP/1.1 101 Web Socket Protocol Handshake", CRLF, the
string "Upgrade: WebSocket", CRLF, the string
"Connection: Upgrade", CRLF.</p>
@@ -39609,11 +39610,12 @@
open a connection and send the following bytes back to the
client:</p>
- <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 53 77 69
-74 63 68 69 6e 67 20 50 72 6f 74 6f 63 6f 6c 73
-0d 0a 55 70 67 72 61 64 65 3a 20 57 65 62 53 6f
-63 6b 65 74 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e
-3a 20 55 70 67 72 61 64 65 0d 0a</pre>
+ <pre>48 54 54 50 2f 31 2e 31 20 31 30 31 20 57 65 62
+20 53 6f 63 6b 65 74 20 50 72 6f 74 6f 63 6f 6c
+20 48 61 6e 64 73 68 61 6b 65 0d 0a 55 70 67 72
+61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a
+43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72
+61 64 65 0d 0a</pre>
<p>Send the string "<code title="">WebSocket-Origin</code>" followed
by a U+003A COLON (":") followed by the <span title="ASCII
More information about the Commit-Watchers
mailing list