Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

body truncated on extra reads

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


john-modperl at o-rourke

Apr 22, 2008, 7:51 AM

Post #1 of 2 (367 views)
Permalink
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


perrin at elem

Apr 22, 2008, 12:38 PM

Post #2 of 2 (339 views)
Permalink
Re: body truncated on extra reads [In reply to]

On Tue, Apr 22, 2008 at 10:51 AM, John ORourke
<john-modperl[at]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

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.