From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: Websocket Handshake 76 Date: Thu, 8 Jul 2010 13:57:43 -0700 Message-ID: <20100708205743.GB2991@dcvr.yhbt.net> References: <20100707172640.26fe0ce8@wigowyr> <20100707203848.GA21844@dcvr.yhbt.net> <20100708164149.37178aed@wigowyr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1278622682 7999 80.91.229.12 (8 Jul 2010 20:58:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Jul 2010 20:58:02 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Thu Jul 08 22:58:01 2010 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline In-Reply-To: <20100708164149.37178aed@wigowyr> User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:96 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWyAM-00072e-3T for gclrrg-rainbows-talk@m.gmane.org; Thu, 08 Jul 2010 22:57:54 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 74B2D1858346; Thu, 8 Jul 2010 16:57:53 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 8ED6E1858346 for ; Thu, 8 Jul 2010 16:57:44 -0400 (EDT) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 9E5C71F488; Thu, 8 Jul 2010 20:57:43 +0000 (UTC) Niklas Hofer wrote: > Am Wed, 7 Jul 2010 13:38:49 -0700 > schrieb Eric Wong : > > > 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... -- Eric Wong _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying