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=0.0 required=3.0 tests=MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: James Tucker Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: [PATCH] env["hack.io"] for Fiber*, Revactor, Thread* models Date: Sun, 13 Dec 2009 13:47:52 +0000 Message-ID: References: <20091211115041.GA14610@dcvr.yhbt.net> <20091211115348.GB14610@dcvr.yhbt.net> <20091211115905.GA15621@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260712826 11344 80.91.229.12 (13 Dec 2009 14:00:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Dec 2009 14:00:26 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Sun Dec 13 15:00:19 2009 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=nN5H29f6h6yencNGECLrIGUTl3doOWIk+bhBR9OAwGc=; b=BmgdkbnM+ylp+PTrUaN0tnbJJ70jAlL+PKc6P6kDwzhFOR+XL3H05ryfuHzeHcrcLJ xSqNu8Sft6NIcj5eHtDH1QMvUUXzPUbVJgtqcLBhmaQy0AnDtJ2VVjQ0Htq+FHCqNY/I itgoy6zWwKZn7y+7e7ZCvpUXA77Cflq6X3Oyg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=sBrKoM/vYD3ts+Wy49f83L8IQIYbCm/MGDXdWRHCddvPGoeUQD5/iWWknSq72W1ZLX vxmGuNMkXgkJI4aZ8Ygp6ht5genuG+Hv9Re6NVxI8EHmG1Vp3igHAweKz9p/qT2qiqw9 2IPxaR5XSQ2Dv4ZeH2ez6sw2UOR3PKyvqO6uQ= In-Reply-To: <20091211115905.GA15621-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Mailer: Apple Mail (2.1077) 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:46 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJozi-0000Ng-4y for gclrrg-rainbows-talk@m.gmane.org; Sun, 13 Dec 2009 15:00:18 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id A49901598082; Sun, 13 Dec 2009 09:00:05 -0500 (EST) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by rubyforge.org (Postfix) with ESMTP id 75B721858309 for ; Sun, 13 Dec 2009 08:47:55 -0500 (EST) Received: by qw-out-2122.google.com with SMTP id 9so422448qwb.29 for ; Sun, 13 Dec 2009 05:47:55 -0800 (PST) Received: by 10.224.121.66 with SMTP id g2mr2232527qar.47.1260712075048; Sun, 13 Dec 2009 05:47:55 -0800 (PST) Received: from ?192.168.1.54? ([199.172.234.251]) by mx.google.com with ESMTPS id 5sm5626837qwg.58.2009.12.13.05.47.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 13 Dec 2009 05:47:54 -0800 (PST) Testing, all my mails to this ML seem to be getting rejected based on content type, seems Mail.app isn't sending plain, when I tell it to, or it doesn't like my S/MIME On 11 Dec 2009, at 11:59, Eric Wong wrote: > This exposes a client IO object directly to the underlying > application. > --- > > In case you already have an installation and just want to patch that, > this is the patch I made for Rainbows! that exposes the ability to > be used with LMGTWTY > > lib/rainbows/base.rb | 1 + > lib/rainbows/const.rb | 6 ++++++ > lib/rainbows/fiber/base.rb | 1 + > lib/rainbows/revactor.rb | 1 + > 4 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb > index 424b43b..a735b82 100644 > --- a/lib/rainbows/base.rb > +++ b/lib/rainbows/base.rb > @@ -43,6 +43,7 @@ module Rainbows > buf << client.readpartial(CHUNK_SIZE) > end > > + env[CLIENT_IO] = client > env[RACK_INPUT] = 0 == hp.content_length ? > HttpRequest::NULL_IO : > Unicorn::TeeInput.new(client, env, hp, buf) > diff --git a/lib/rainbows/const.rb b/lib/rainbows/const.rb > index 69e58aa..900c9d9 100644 > --- a/lib/rainbows/const.rb > +++ b/lib/rainbows/const.rb > @@ -19,5 +19,11 @@ module Rainbows > CONN_ALIVE = "Connection: keep-alive\r\n" > LOCALHOST = "127.0.0.1" > > + # client IO object that supports reading and writing directly > + # without filtering it through the HTTP chunk parser. > + # Maybe we can get this renamed to "rack.io" if it becomes part > + # of the official spec, but for now it is "hack.io" > + CLIENT_IO = "hack.io".freeze > + > end > end > diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb > index 129448c..995b4af 100644 > --- a/lib/rainbows/fiber/base.rb > +++ b/lib/rainbows/fiber/base.rb > @@ -82,6 +82,7 @@ module Rainbows > buf << (client.read_timeout or return) > end > > + env[CLIENT_IO] = client > env[RACK_INPUT] = 0 == hp.content_length ? > HttpRequest::NULL_IO : TeeInput.new(client, env, hp, buf) > env[REMOTE_ADDR] = remote_addr > diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb > index b647d48..ff0e429 100644 > --- a/lib/rainbows/revactor.rb > +++ b/lib/rainbows/revactor.rb > @@ -49,6 +49,7 @@ module Rainbows > buf << client.read(*rd_args) > end > > + env[Const::CLIENT_IO] = client > env[Const::RACK_INPUT] = 0 == hp.content_length ? > HttpRequest::NULL_IO : > Rainbows::Revactor::TeeInput.new(client, env, hp, buf) > -- > 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 _______________________________________________ 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