Subject: | Apache::Request + Compress::Zlib |
Hi Geoff,
Paul Marquess here - I'm the author of Compress::Zlib. I've had a bug
reported to me from someone using your Apache::Request module with
Compress::Zlib (see https://rt.cpan.org/Ticket/Display.html?id=39629).
I think the problem is caused by the filehandle returned from
Apache::Upload - it doesn't inherit from IO::Handle, so the $fh->read
syntax doesn't work.
For example this handler will fail on the $fh->read line
sub handler {
my $r = shift;
$r->send_http_header('text/plain');
my $apr = Apache::Request->new ($r);
my $upload = $apr->upload;
my $fh = $upload->fh;
my $status = $fh->read($buffer, 20);
}
I think all that is needed is for Apache::Upload to include this
@Apache::Upload::ISA = qw(IO::Handle);
cheers
Paul