perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <torsten.foert...@gmx.net>
Subject [PATCH] Apache2::RequestIO::read bugfix + enhancements
Date Thu, 17 Jul 2008 11:18:21 GMT
Hi,

it began with an innocent cycle to read the request body:

    1 while( do{my $l=$r->read($content, 8000, $where); $where+=$l; $l} );

Surprisingly $content was an empty string while $where said that some data was 
read. I found that Apache2::RequestIO::read resets the passed buffer when end 
of file is read that means if modperl_request_read() returns 0.

Then I thought to remove these 2 XXX lines. And then what would happen in 
these situations:

$content=123456;
$r->read($content, 100, 3);

or

"....."=~/(.*)/;
$r->read($1, 100);

Please review.

Torsten

Mime
View raw message