You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by John ORourke <jo...@o-rourke.org> on 2008/04/22 16:51:17 UTC
body truncated on extra reads
Hi folks,
I'm curious - can anyone explain what actually happens internally if you
try to read more from $r->read() than specified in the Content-Length
header?
I noticed when trying subsequent calls to read after all bytes had been
read that it truncates the buffer, which I guess is understandable as it
could be the next request. I'm just wondering wether $r->read( $buffer,
1000 ) is a bad thing to do if the incoming content is only 900 bytes.
cheers
John
Re: body truncated on extra reads
Posted by Perrin Harkins <pe...@elem.com>.
On Tue, Apr 22, 2008 at 10:51 AM, John ORourke
<jo...@o-rourke.org> wrote:
> I'm curious - can anyone explain what actually happens internally if you
> try to read more from $r->read() than specified in the Content-Length
> header?
What used to happen is it would hang the process forever. Not sure if
it still does. Is there a reason you're not using Apache2::Request or
CGI.pm?
- Perrin