Truncated request bodies

Vadim Spivak vadim at spivak.net
Sat Oct 24 18:05:47 EDT 2009


> Hi Vadim,
>
> What's the output of that standalone ruby example for you?  Is there a
> bug filed with ruby-core I could look at?

"Should be 5: 0"

I haven't had a chance to file a bug yet and couldn't find

Also, if you don't set sync to true, then you get the expected output
5 instead of 0.

>
> Also, does using f << or f.syswrite change things?
> f.sync = true should really make it unnecessary...

I tried both and they didn't make a difference

>
>        f = File.open("bar", File::RDWR|File::CREAT, 0600)
>        f.sync=true
>        f.read  # why is this here?
>        f << "Hello"  # or f.syswrite
>
>        # would an explicit f.flush here work? shouldn't be needed
>        # with f.sync = true
>        puts "Should be 5: #{f.pos}"
>        f.close
>
> > I couldn't reproduce this on 1.9.1 on OS X or 1.8.7 on Linux.
>
> I'll definitely need help with testing this then since I only have
> Linux.
>
> Which 1.8.7 patchlevel is your OS X Ruby at?  Do you know if the
> OS X packagers apply any vendor patches on top of the stock Ruby distro
> that could be causing it?  Are those patches downloadable anywhere?
> Thanks!

I've tested both on 1.8.7 patch level 72.  Also, just to make sure it
wasn't a vendor patch, I just downloaded and compiled the source for
1.8.7 p72 and saw the same issue.

# ships with OS X
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]

# compiled from source on OS X
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin10.0.0]

# linux install
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

Also, I just tried it on a FreeBSD 7.2 VM and saw the same results as
on OS X.  (VM downloaded from http://www.thoughtpolice.co.uk/vmware/)

Thanks,
Vadim

>
> --
> Eric Wong


More information about the mongrel-unicorn mailing list