websocket HTTP response parsing

Hi,

looking at <http://www.whatwg.org/specs/web-apps/current-work/#network>:

> 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 equal to the following bytes, then fail the Web Socket connection and abort these steps.
> 
> 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
> 
> The string "HTTP/1.1 101 Switching Protocols", CRLF, the string "Upgrade: WebSocket", CRLF, the string "Connection: Upgrade", CRLF.

Besides the obvious spec readability problem (why confuse people with 
hex dumps?), why does the spec assign any importance of the reason 
phrase, when RFC2616 clearly says:

"The Reason-Phrase is intended to give a short textual description of 
the Status-Code. The Status-Code is intended for use by automata and the 
Reason-Phrase is intended for the human user." -- 
<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.6.1.1.p.1>

?

BR, Julian

Received on Thursday, 3 July 2008 08:53:35 UTC