Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

body truncated on extra reads

John ORourke

2008-04-22

Replies: Find Java Web Hosting

Author LoginPost Reply
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

©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.