[Mono-dev] [PATCH] HttpRequest Content-Type and Content-Length fixes

Jason Diamond jason at diamond.name
Tue Nov 8 12:42:39 EST 2005

On 11/8/05, Gonzalo Paniagua Javier <gonzalo at ximian.com> wrote:
> The Math.Max (...) line is not needed as it is inside a 'if
> (content_length > 0)' and total is going to be either 0 or
> buffer.Length.

Try running the test without the Math.Max line and you'll see an
exception get thrown. That's because total is bigger than
content_length which makes the number of bytes we try to allocate a
negative number.


More information about the Mono-devel-list mailing list