
torsten.foertsch at gmx
Jul 17, 2008, 4:18 AM
Post #1 of 3
(2156 views)
Permalink
|
|
[PATCH] Apache2::RequestIO::read bugfix + enhancements
|
|
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
|