Re: [whatwg] Simon's WebSocket feedback

2010-04-15 Thread Ian Hickson
On Thu, 15 Apr 2010, Simon Pieters wrote:
 On Thu, 15 Apr 2010 03:08:12 +0200, Ian Hickson i...@hixie.ch wrote:
  On Mon, 12 Apr 2010, Simon Pieters wrote:
   
   WebSocket establish a WebSocket connection:
   
   [[
   21. Insert spaces1 U+0020 SPACE characters into key1 at random positions.
   
   Insert spaces2 U+0020 SPACE characters into key2 at random positions.
   ]]
   
   It seems a bit risky to insert spaces at the start and at the end of the
   string; I imagine some servers would ignore them (which would be a bug
   in the server, but hard to notice since it's random). Maybe we should
   avoid inserting them at the start and at the end.
  
  Since key1 and key2 can be numbers in the range 1-9, I don't see how to
  avoid at least one of those two places.
 
 You can insert the random characters before inserting the spaces.

Ooh, that's genius. Done.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] Simon's WebSocket feedback

2010-04-14 Thread Simon Pieters

On Thu, 15 Apr 2010 03:08:12 +0200, Ian Hickson i...@hixie.ch wrote:


On Mon, 12 Apr 2010, Simon Pieters wrote:


WebSocket establish a WebSocket connection:

[[
21. Insert spaces1 U+0020 SPACE characters into key1 at random  
positions.


Insert spaces2 U+0020 SPACE characters into key2 at random positions.
]]

It seems a bit risky to insert spaces at the start and at the end of the
string; I imagine some servers would ignore them (which would be a bug
in the server, but hard to notice since it's random). Maybe we should
avoid inserting them at the start and at the end.


Since key1 and key2 can be numbers in the range 1-9, I don't see how to
avoid at least one of those two places.


You can insert the random characters before inserting the spaces.

--
Simon Pieters
Opera Software