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.7 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Truncated request bodies Date: Sun, 25 Oct 2009 14:31:31 -0700 Message-ID: <20091025213131.GB2505@dcvr.yhbt.net> References: <20091025000435.GA4130@dcvr.yhbt.net> <20091025034936.GA25264@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: ger.gmane.org 1256506316 25322 80.91.229.12 (25 Oct 2009 21:31:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Oct 2009 21:31:56 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Sun Oct 25 22:31:49 2009 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: <20091025034936.GA25264@dcvr.yhbt.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:106 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1N2Agn-0007ps-AP for gclrug-mongrel-unicorn@m.gmane.org; Sun, 25 Oct 2009 22:31:49 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 5C8CF185826A; Sun, 25 Oct 2009 17:31:46 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 495521858249 for ; Sun, 25 Oct 2009 17:31:38 -0400 (EDT) Received: from localhost (user-118bg0q.cable.mindspring.com [66.133.192.26]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPSA id AD6B21F793; Sun, 25 Oct 2009 21:31:35 +0000 (UTC) Eric Wong wrote: > Eric Wong wrote: > > > > Does the following patch fix things for you? Hi Vadim, I actually just got a better patch offlist that looks more reasonable than mine: diff --git a/lib/unicorn/tee_input.rb b/lib/unicorn/tee_input.rb index 188e2ea..7e77cdf 100644 --- a/lib/unicorn/tee_input.rb +++ b/lib/unicorn/tee_input.rb @@ -131,6 +131,7 @@ module Unicorn begin if parser.filter_body(dst, socket.readpartial(length, buf)).nil? @tmp.write(dst) + @tmp.seek(0, IO::SEEK_END) # workaround FreeBSD/OSX + MRI 1.8.x bug return dst end rescue EOFError --- Also pushed out to git://git.bogomips.org/unicorn Upon further inspection of the Ruby 1.8.7 source, I'm surprised it worked anywhere, glibc + Linux included :x I've managed to open a ticket on the issue for ruby-core: http://redmine.ruby-lang.org/issues/show/2267 -- Eric Wong