Skip to content

Commit

Permalink
[e] (0) Be less confusing about how to skip a space after the colon w…
Browse files Browse the repository at this point in the history
…hen reading fields in the handshake.

git-svn-id: http://svn.whatwg.org/webapps@5050 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 15, 2010
1 parent 715c5f1 commit e4714ed
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 51 deletions.
36 changes: 12 additions & 24 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -70072,33 +70072,16 @@ <h6 id=opening-handshake-0><span class=secno>10.3.4.3.1 </span>Opening handshake

<li>

<p>Read a byte from the server.</p>

<p>If the connection closes before this byte is received, then
<a href=#fail-the-websocket-connection>fail the WebSocket connection</a> and abort these
steps.</p>

<p>Otherwise, handle the byte as described in the appropriate
entry below:</p>

<dl class=switch><dt>If the byte is 0x20 (ASCII space)</dt>

<dd>Ignore the byte and move on to the next step.</dd>
<p>Let <var title="">count</var> equal 0.</p>


<dt>Otherwise</dt>

<dd>Treat the byte as described by the list in the next step,
then move on to that next step for real.</dd>

</dl><p class=note>This skips past a space character after the colon,
if necessary.</p>
<p class=note>This is used in the next step to skip past a space
character after the colon, if necessary.</p>

</li>

<li>

<p>Read a byte from the server.</p>
<p>Read a byte from the server and increment <var title="">count</var> by 1.</p>

<p>If the connection closes before this byte is received, then
<a href=#fail-the-websocket-connection>fail the WebSocket connection</a> and abort these
Expand All @@ -70107,7 +70090,12 @@ <h6 id=opening-handshake-0><span class=secno>10.3.4.3.1 </span>Opening handshake
<p>Otherwise, handle the byte as described in the appropriate
entry below:</p>

<dl class=switch><dt>If the byte is 0x0D (ASCII CR)</dt>
<dl class=switch><dt>If the byte is 0x20 (ASCII space) and <var title="">count</var> equals 1</dt>

<dd>Ignore the byte and redo this step for the next byte.</dd>


<dt>If the byte is 0x0D (ASCII CR)</dt>

<dd>Move on to the next step.</dd>

Expand All @@ -70123,8 +70111,8 @@ <h6 id=opening-handshake-0><span class=secno>10.3.4.3.1 </span>Opening handshake
<dd>Append the byte to the <var title="">value</var> byte array
and redo this step for the next byte.</dd>

</dl><p class=note>This reads a field value, terminated by a
CRLF.</p>
</dl><p class=note>This reads a field value, terminated by a CRLF,
skipping past a single space after the colon if there is one.</p>

</li>

Expand Down
39 changes: 12 additions & 27 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -78611,37 +78611,17 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>

<li>

<p>Read a byte from the server.</p>

<p>If the connection closes before this byte is received, then
<span>fail the WebSocket connection</span> and abort these
steps.</p>

<p>Otherwise, handle the byte as described in the appropriate
entry below:</p>

<dl class="switch">

<dt>If the byte is 0x20 (ASCII space)</dt>
<p>Let <var title="">count</var> equal 0.</p>

<dd>Ignore the byte and move on to the next step.</dd>


<dt>Otherwise</dt>

<dd>Treat the byte as described by the list in the next step,
then move on to that next step for real.</dd>

</dl>

<p class="note">This skips past a space character after the colon,
if necessary.</p>
<p class="note">This is used in the next step to skip past a space
character after the colon, if necessary.</p>

</li>

<li>

<p>Read a byte from the server.</p>
<p>Read a byte from the server and increment <var
title="">count</var> by 1.</p>

<p>If the connection closes before this byte is received, then
<span>fail the WebSocket connection</span> and abort these
Expand All @@ -78652,6 +78632,11 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>

<dl class="switch">

<dt>If the byte is 0x20 (ASCII space) and <var title="">count</var> equals 1</dt>

<dd>Ignore the byte and redo this step for the next byte.</dd>


<dt>If the byte is 0x0D (ASCII CR)</dt>

<dd>Move on to the next step.</dd>
Expand All @@ -78670,8 +78655,8 @@ Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE=</pre>

</dl>

<p class="note">This reads a field value, terminated by a
CRLF.</p>
<p class="note">This reads a field value, terminated by a CRLF,
skipping past a single space after the colon if there is one.</p>

</li>

Expand Down

0 comments on commit e4714ed

Please sign in to comment.