W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2010

[whatwg] some comments on establish a WebSocket connection

From: Simon Pieters <simonp@opera.com>
Date: Thu, 01 Apr 2010 10:04:51 +0100
Message-ID: <op.vag4qdijidj3kv@simon-pieterss-macbook.local>
The establish a WebSocket connection algorithm says:

[[
35. ...

?If the byte is 0x20 (ASCII space)
Ignore the byte and move on to the next step.

Otherwise
Treat the byte as described by the list in the next step, then move on to  
that next step for real.

Note: This skips past a space character after the colon, if necessary.

36. Read a byte from the server.

If the connection closes before this byte is received, then fail the  
WebSocket connection and abort these steps.

Otherwise, handle the byte as described in the appropriate entry below:

?If the byte is 0x0D (ASCII CR)
Move on to the next step.
]]

Consider the case when the server gives a colon followed by CR. My reading  
is that step 36 will be run twice:

Upon receiving the CR in step 35, "Treat the byte as described by the list  
in the next step" which is "Move on to the next step." (i.e. step 37),  
"then move on to that next step for real." (i.e. step 36).


Step 41 says:

[[
If the entry's name is "set-cookie" or "set-cookie2" or another  
cookie-related field name

If the relevant specification is supported by the user agent, handle the  
cookie as defined by the appropriate specification, with the resource  
being the one with the host host, the port port, the path (and possibly  
query parameters) resource name, and the scheme http if secure is false  
and https if secure is true. [COOKIES]
]]

What should be done if the relevant specification is not supported?

-- 
Simon Pieters
Opera Software
Received on Thursday, 1 April 2010 02:04:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:22 UTC