Rodster001 has asked for the wisdom of the Perl Monks concerning the following question:
This works fine as a cgi. But I am having a little trouble porting this to mod_perl. I am thinking that if I turn off buffered output $| = 1 and then get Archive::Zip::SimpleZip to stream to Apache2::RequestIO::print() this will work. But I am not sure how to "select" Apache2::RequestIO::print().print "Content-Disposition: attachment; filename=\"myarchive.zip\"\n\n +"; my $z = new Archive::Zip::SimpleZip '-', Stream => 1; my $fh = $z->openMember(Name => "myarchive.zip"); print $fh <binary data here>; close($fh); $z->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing a stream to STDOUT under mod_perl
by beech (Parson) on Mar 15, 2017 at 23:30 UTC | |
by Rodster001 (Pilgrim) on Mar 16, 2017 at 01:56 UTC | |
by beech (Parson) on Mar 16, 2017 at 02:33 UTC | |
by Rodster001 (Pilgrim) on Mar 16, 2017 at 18:09 UTC | |
by pmqs (Friar) on Mar 19, 2017 at 23:12 UTC | |
by beech (Parson) on Mar 17, 2017 at 01:31 UTC |