Truncated request bodies

Vadim Spivak vadim at spivak.net
Mon Oct 26 22:48:35 EDT 2009


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

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


More information about the mongrel-unicorn mailing list