« Return to Thread: [PATCH] Apache2::RequestIO::read bugfix + enhancements

[PATCH] Apache2::RequestIO::read bugfix + enhancements

by Torsten Foertsch :: Rate this Message:

Reply to Author | View in Thread

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

[attachment removed]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: [PATCH] Apache2::RequestIO::read bugfix + enhancements

LightInTheBox - Buy quality products at wholesale price!