Websocket Handshake 76
normalperson at yhbt.net
Thu Jul 8 16:57:43 EDT 2010
Niklas Hofer <niklas+rainbows at lanpartei.de> wrote:
> Am Wed, 7 Jul 2010 13:38:49 -0700
> schrieb Eric Wong <normalperson at yhbt.net>:
> > I haven't gotten a chance to look into the new WebSocket updates, but
> > can't you just read the 8 bytes off env["rack.input"]?
> > env["rack.input"].read(8)
> I tried that without success, it does not give me anything (seems to
> be empty), even if I rewind it beforehand.
Ah, apparently -76 doesn't send Content-Length and that
screws things up (UGH!)
'env["hack.io"].read(8)' has a _chance_ of working if the
client delays sending the 8 bytes.
I think I'll need to change Rainbows! to not use readpartial and use
recv_nonblock with MSG_PEEK instead...
More information about the rainbows-talk