unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Vadim Spivak <vadim@spivak.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Truncated request bodies
Date: Mon, 26 Oct 2009 19:48:35 -0700	[thread overview]
Message-ID: <d779a0c60910261948x33201598t1f7791729d58245e@mail.gmail.com> (raw)
In-Reply-To: <20091025213131.GB2505@dcvr.yhbt.net>

Thanks Eric, I verified that it's working now.

On Sun, Oct 25, 2009 at 2:31 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Eric Wong <normalperson@yhbt.net> wrote:
>> Eric Wong <normalperson@yhbt.net> 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
> _______________________________________________
> mongrel-unicorn mailing list
> mongrel-unicorn@rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-unicorn
>

      reply	other threads:[~2009-10-27  2:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d779a0c60910230001r5f7ecea3l4904d48a08d2130f@mail.gmail.com>
2009-10-23 14:38 ` Truncated request bodies Vadim Spivak
2009-10-23 16:15   ` Eric Wong
2009-10-24 22:05   ` Vadim Spivak
2009-10-25  0:04     ` Eric Wong
2009-10-25  3:49       ` Eric Wong
2009-10-25 21:31         ` Eric Wong
2009-10-27  2:48           ` Vadim Spivak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d779a0c60910261948x33201598t1f7791729d58245e@mail.gmail.com \
    --to=vadim@spivak.net \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).