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: John Leach Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: streaming input for large requests Date: Wed, 11 Aug 2010 09:54:48 +0100 Organization: Brightbox Message-ID: <1281516888.8692.49.camel@dogen> References: <1281478992.8692.15.camel@dogen> <20100810232527.GA14486@dcvr.yhbt.net> 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 1281517156 31879 80.91.229.12 (11 Aug 2010 08:59:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Aug 2010 08:59:16 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed Aug 11 10:59:13 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 In-Reply-To: <20100810232527.GA14486-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Mailer: Evolution 2.28.3 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:118 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj79M-0002kP-5Y for gclrrg-rainbows-talk@m.gmane.org; Wed, 11 Aug 2010 10:59:04 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 3FB691858354; Wed, 11 Aug 2010 04:59:03 -0400 (EDT) Received: from smtp133.iad.emailsrvr.com (smtp133.iad.emailsrvr.com [207.97.245.133]) by rubyforge.org (Postfix) with ESMTP id BFC9E1858354 for ; Wed, 11 Aug 2010 04:54:50 -0400 (EDT) Received: from relay3.r3.iad.emailsrvr.com (localhost [127.0.0.1]) by relay3.r3.iad.emailsrvr.com (SMTP Server) with ESMTP id 5AA7244C0C8 for ; Wed, 11 Aug 2010 04:54:50 -0400 (EDT) Received: by relay3.r3.iad.emailsrvr.com (Authenticated sender: john-AT-brightbox.co.uk) with ESMTPSA id 07F7444C047 for ; Wed, 11 Aug 2010 04:54:49 -0400 (EDT) On Tue, 2010-08-10 at 16:25 -0700, Eric Wong wrote: > Yes, we store uploads to an unlinked temporary file if the body is > larger than 112 Kbytes (this threshold was established by Mongrel back > in the day). > > Rack currently requires rewindability, but this requirement will > most likely be optional in Rack 2.x, and we'll update our code > to match, then. > > Meanwhile, you can either: > > 1. Write a module to disable writes to tmp for the Unicorn::TeeInput > class (or monkey patch it) it. > > 2. Without loading Rack::Lint (or anything that wraps env["rack.input"]): > Redirect the temporary file to /dev/null: > > input = env["rack.input"] > if input.respond_to?(:tmp) > tmp = input.tmp > # StringIO is used for bodies <112K, can't reopen those > tmp.respond_to?(:reopen) and tmp.reopen('/dev/null', 'wb') > end > thanks for the detailed response Eric. I'll give this a go. John. _______________________________________________ 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