On Wed, 4 Jun 2008 00:35:16 -0400
"Randy Fischer" <[EMAIL PROTECTED]> wrote:

> On Tue, Jun 3, 2008 at 8:16 PM, Zed A. Shaw <[EMAIL PROTECTED]> wrote:

> Naw, it's the content length in the body of a PUT,  I ask since I saw
> 
>    int content_length

Well, looking in the source I can't see where that's actually used to
store the Content-Length header value.  It actually seems to be dead.
Instead you have this line in http_request.rb:

content_length = @params[Const::CONTENT_LENGTH].to_i

Now, that means it relies on Ruby's base integer type to store the
content length:

http://www.ruby-doc.org/core/classes/Fixnum.html

""A Fixnum holds Integer values that can be represented in a native
machine word (minus 1 bit). If any operation on a Fixnum exceeds this
range, the value is automatically converted to a Bignum.""

Which is kind of vague, but there's a good chance it's implemented as a
32-bit signed integer giving you a problem with a 4G content size.  It
should be converted to a Bignum on overflow, but a quick test would be
to check the class of the content_length right after this line to see
what it's getting.

-- 
Zed A. Shaw
- Hate: http://savingtheinternetwithhate.com/
- Good: http://www.zedshaw.com/
- Evil: http://yearofevil.com/
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to