Skip to content

Commit

Permalink
[e] (0) Refer to ANSI for the definition of ASCII.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@4637 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 30, 2010
1 parent c397495 commit 9aaa15f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 46 deletions.
51 changes: 29 additions & 22 deletions complete.html
Expand Up @@ -67345,7 +67345,7 @@ <h6 id=handshake><span class=secno>10.3.4.3.1 </span>Handshake</h6>
<pre>47 45 54 20</pre>

<p>Send the <var title="">resource name</var> value, encoded as
ASCII.</p>
ANSI_X3.4-1968 (US-ASCII). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>Send the following bytes:</p>

Expand All @@ -67367,12 +67367,14 @@ <h6 id=handshake><span class=secno>10.3.4.3.1 </span>Handshake</h6>
<pre>48 6F 73 74 3A 20</pre>

<p>Send the <var title="">host</var> value, <a href=#converted-to-ascii-lowercase>converted to
ASCII lowercase</a>, and encoded as ASCII.</p>
ASCII lowercase</a>, and encoded as ANSI_X3.4-1968
(US-ASCII). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>If <var title="">secure</var> is false, and <var title="">port</var> is not 80, or if <var title="">secure</var> is
true, and <var title="">port</var> is not 443, then send an 0x3A
byte (ASCII :) followed by the value of <var title="">port</var>,
expressed as a base-ten integer, encoded as ASCII.</p>
expressed as a base-ten integer, encoded as ANSI_X3.4-1968
(US-ASCII). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>Send the following bytes:</p>

Expand All @@ -67389,7 +67391,7 @@ <h6 id=handshake><span class=secno>10.3.4.3.1 </span>Handshake</h6>
<pre>4F 72 69 67 69 6E 3A 20</pre>

<p>Send the <var title="">origin</var> value, <a href=#converted-to-ascii-lowercase>converted to
ASCII lowercase</a>, encoded as ASCII. <a href=#refsORIGIN>[ORIGIN]</a></p>
ASCII lowercase</a>, encoded as ANSI_X3.4-1968 (US-ASCII). <a href=#refsORIGIN>[ORIGIN]</a> <a href=#refsRFC1345>[RFC1345]</a></p>

<p class=note>The <var title="">origin</var> value is a string
that was passed to this algorithm.</p>
Expand All @@ -67412,7 +67414,7 @@ <h6 id=handshake><span class=secno>10.3.4.3.1 </span>Handshake</h6>
6F 6C 3A 20</pre>

<p>Send the <var title="">protocol</var> value, encoded as
ASCII.</p>
ANSI_X3.4-1968 (US-ASCII). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>Send the following bytes:</p>

Expand Down Expand Up @@ -67511,24 +67513,28 @@ <h6 id=handshake><span class=secno>10.3.4.3.1 </span>Handshake</h6>
connection</a> and abort these steps.</p>

<!--(v2-redirect)
<p>If <var title="">code</var>, interpreted as ASCII, is either
"<code title="">301</code>", "<code title="">302</code>", "<code
title="">303</code>", "<code title="">307</code>", then let <var
title="">mode</var> be <i title="">redirect</i>.</p>
<p>If <var title="">code</var>, interpreted as ANSI_X3.4-1968
(US-ASCII), is either "<code title="">301</code>", "<code
title="">302</code>", "<code title="">303</code>", "<code
title="">307</code>", then let <var title="">mode</var> be <i
title="">redirect</i>. <a href="#refsRFC1345">[RFC1345]</a></p>
-->
<!--(v2-ws-auth)
<p>If <var title="">code</var>, interpreted as ASCII, is "<code
title="">401</code>", then let <var title="">mode</var> be <i
title="">authenticate</i>.</p>
<p>If <var title="">code</var>, interpreted as ANSI_X3.4-1968
(US-ASCII), is "<code title="">401</code>", then let <var
title="">mode</var> be <i title="">authenticate</i>. <a
href="#refsRFC1345">[RFC1345]</a></p>
-->

<p>If <var title="">code</var>, interpreted as ASCII, is "<code title="">407</code>", then either close the connection and jump
back to step 2, providing appropriate authentication information,
or <a href=#fail-the-web-socket-connection>fail the Web Socket connection</a>. 407 is the code
used by HTTP meaning "Proxy Authentication Required". User agents
that support proxy authentication must interpret the response as
defined by HTTP (e.g. to find and interpret the <code title=http-Proxy-Authenticate>Proxy-Authenticate</code>
header).</p>
<p>If <var title="">code</var>, interpreted as ANSI_X3.4-1968
(US-ASCII), is "<code title="">407</code>", then either close the
connection and jump back to step 2, providing appropriate
authentication information, or <a href=#fail-the-web-socket-connection>fail the Web Socket
connection</a>. 407 is the code used by HTTP meaning "Proxy
Authentication Required". User agents that support proxy
authentication must interpret the response as defined by HTTP
(e.g. to find and interpret the <code title=http-Proxy-Authenticate>Proxy-Authenticate</code>
header). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>Otherwise, <a href=#fail-the-web-socket-connection>fail the Web Socket connection</a> and
abort these steps.</p>
Expand Down Expand Up @@ -68089,15 +68095,16 @@ <h6 id="sending-the-server's-handshake"><span class=secno>10.3.4.4.1 </span>Send

<p>These bytes must be the first bytes sent on the TCP connection by
the server. They must be followed by the <var title="">origin</var>
string, encoded as ASCII, followed by the following bytes:</p>
string, encoded as ANSI_X3.4-1968 (US-ASCII), followed by the
following bytes: <a href=#refsRFC1345>[RFC1345]</a></p>

<pre>0D 0A 57 65 62 53 6F 63 6B 65 74 2D 4C 6F 63 61
74 69 6F 6E 3A 20</pre>

<p>The server must then send the string that results from <a href=#construct-a-web-socket-url title="construct a Web Socket URL">constructing a Web Socket
URL</a> from <var title="">host</var>, <var title="">port</var>,
<var title="">resource name</var>, and <var title="">secure
flag</var>, encoded as ASCII.</p>
flag</var>, encoded as ANSI_X3.4-1968 (US-ASCII). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>If the <var title="">subprotocol</var> is not null, then the
server must then send the following bytes:</p>
Expand All @@ -68106,7 +68113,7 @@ <h6 id="sending-the-server's-handshake"><span class=secno>10.3.4.4.1 </span>Send
6F 63 6F 6C 3A 20</pre>

<p>...followed by the <var title="">subprotocol</var> string,
encoded as ASCII.</p>
encoded as ANSI_X3.4-1968 (US-ASCII). <a href=#refsRFC1345>[RFC1345]</a></p>

<p>Finally, the server must end its side of the handshake by sending
the four bytes 0x0D 0x0A 0x0D 0x0A to the client.</p>
Expand Down
59 changes: 35 additions & 24 deletions source
Expand Up @@ -76904,7 +76904,8 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>
<pre>47 45 54 20</pre>

<p>Send the <var title="">resource name</var> value, encoded as
ASCII.</p>
ANSI_X3.4-1968 (US-ASCII). <a
href="#refsRFC1345">[RFC1345]</a></p>

<p>Send the following bytes:</p>

Expand All @@ -76926,13 +76927,15 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>
<pre>48 6F 73 74 3A 20</pre>

<p>Send the <var title="">host</var> value, <span>converted to
ASCII lowercase</span>, and encoded as ASCII.</p>
ASCII lowercase</span>, and encoded as ANSI_X3.4-1968
(US-ASCII). <a href="#refsRFC1345">[RFC1345]</a></p>

<p>If <var title="">secure</var> is false, and <var
title="">port</var> is not 80, or if <var title="">secure</var> is
true, and <var title="">port</var> is not 443, then send an 0x3A
byte (ASCII :) followed by the value of <var title="">port</var>,
expressed as a base-ten integer, encoded as ASCII.</p>
expressed as a base-ten integer, encoded as ANSI_X3.4-1968
(US-ASCII). <a href="#refsRFC1345">[RFC1345]</a></p>

<p>Send the following bytes:</p>

Expand All @@ -76949,8 +76952,9 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>
<pre>4F 72 69 67 69 6E 3A 20</pre>

<p>Send the <var title="">origin</var> value, <span>converted to
ASCII lowercase</span>, encoded as ASCII. <a
href="#refsORIGIN">[ORIGIN]</a></p>
ASCII lowercase</span>, encoded as ANSI_X3.4-1968 (US-ASCII). <a
href="#refsORIGIN">[ORIGIN]</a> <a
href="#refsRFC1345">[RFC1345]</a></p>

<p class="note">The <var title="">origin</var> value is a string
that was passed to this algorithm.</p>
Expand All @@ -76973,7 +76977,8 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>
6F 6C 3A 20</pre>

<p>Send the <var title="">protocol</var> value, encoded as
ASCII.</p>
ANSI_X3.4-1968 (US-ASCII). <a
href="#refsRFC1345">[RFC1345]</a></p>

<p>Send the following bytes:</p>

Expand Down Expand Up @@ -77080,26 +77085,29 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>
connection</span> and abort these steps.</p>

<!--(v2-redirect)
<p>If <var title="">code</var>, interpreted as ASCII, is either
"<code title="">301</code>", "<code title="">302</code>", "<code
title="">303</code>", "<code title="">307</code>", then let <var
title="">mode</var> be <i title="">redirect</i>.</p>
<p>If <var title="">code</var>, interpreted as ANSI_X3.4-1968
(US-ASCII), is either "<code title="">301</code>", "<code
title="">302</code>", "<code title="">303</code>", "<code
title="">307</code>", then let <var title="">mode</var> be <i
title="">redirect</i>. <a href="#refsRFC1345">[RFC1345]</a></p>
-->
<!--(v2-ws-auth)
<p>If <var title="">code</var>, interpreted as ASCII, is "<code
title="">401</code>", then let <var title="">mode</var> be <i
title="">authenticate</i>.</p>
<p>If <var title="">code</var>, interpreted as ANSI_X3.4-1968
(US-ASCII), is "<code title="">401</code>", then let <var
title="">mode</var> be <i title="">authenticate</i>. <a
href="#refsRFC1345">[RFC1345]</a></p>
-->

<p>If <var title="">code</var>, interpreted as ASCII, is "<code
title="">407</code>", then either close the connection and jump
back to step 2, providing appropriate authentication information,
or <span>fail the Web Socket connection</span>. 407 is the code
used by HTTP meaning "Proxy Authentication Required". User agents
that support proxy authentication must interpret the response as
defined by HTTP (e.g. to find and interpret the <code
<p>If <var title="">code</var>, interpreted as ANSI_X3.4-1968
(US-ASCII), is "<code title="">407</code>", then either close the
connection and jump back to step 2, providing appropriate
authentication information, or <span>fail the Web Socket
connection</span>. 407 is the code used by HTTP meaning "Proxy
Authentication Required". User agents that support proxy
authentication must interpret the response as defined by HTTP
(e.g. to find and interpret the <code
title="http-Proxy-Authenticate">Proxy-Authenticate</code>
header).</p>
header). <a href="#refsRFC1345">[RFC1345]</a></p>

<p>Otherwise, <span>fail the Web Socket connection</span> and
abort these steps.</p>
Expand Down Expand Up @@ -77743,7 +77751,8 @@ multi-origin semantics described in [ORIGIN] applying. (http-origin)

<p>These bytes must be the first bytes sent on the TCP connection by
the server. They must be followed by the <var title="">origin</var>
string, encoded as ASCII, followed by the following bytes:</p>
string, encoded as ANSI_X3.4-1968 (US-ASCII), followed by the
following bytes: <a href="#refsRFC1345">[RFC1345]</a></p>

<pre>0D 0A 57 65 62 53 6F 63 6B 65 74 2D 4C 6F 63 61
74 69 6F 6E 3A 20</pre>
Expand All @@ -77752,7 +77761,8 @@ multi-origin semantics described in [ORIGIN] applying. (http-origin)
title="construct a Web Socket URL">constructing a Web Socket
URL</span> from <var title="">host</var>, <var title="">port</var>,
<var title="">resource name</var>, and <var title="">secure
flag</var>, encoded as ASCII.</p>
flag</var>, encoded as ANSI_X3.4-1968 (US-ASCII). <a
href="#refsRFC1345">[RFC1345]</a></p>

<p>If the <var title="">subprotocol</var> is not null, then the
server must then send the following bytes:</p>
Expand All @@ -77761,7 +77771,8 @@ multi-origin semantics described in [ORIGIN] applying. (http-origin)
6F 63 6F 6C 3A 20</pre>

<p>...followed by the <var title="">subprotocol</var> string,
encoded as ASCII.</p>
encoded as ANSI_X3.4-1968 (US-ASCII). <a
href="#refsRFC1345">[RFC1345]</a></p>

<p>Finally, the server must end its side of the handshake by sending
the four bytes 0x0D 0x0A 0x0D 0x0A to the client.</p>
Expand Down

0 comments on commit 9aaa15f

Please sign in to comment.