W3C home > Mailing lists > Public > public-html@w3.org > July 2008

websocket HTTP response parsing

From: Julian Reschke <julian.reschke@gmx.de>
Date: Thu, 03 Jul 2008 10:52:46 +0200
Message-ID: <486C935E.40709@gmx.de>
To: "public-html@w3.org" <public-html@w3.org>

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

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:56 UTC