Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Printing a stream to STDOUT under mod_perl

by Rodster001 (Pilgrim)
on Mar 16, 2017 at 01:56 UTC ( [id://1184804]=note: print w/replies, xml ) Need Help??


in reply to Re: Printing a stream to STDOUT under mod_perl
in thread Printing a stream to STDOUT under mod_perl

I have. But this won't work for my needs.
  • Comment on Re^2: Printing a stream to STDOUT under mod_perl

Replies are listed 'Best First'.
Re^3: Printing a stream to STDOUT under mod_perl
by beech (Parson) on Mar 16, 2017 at 02:33 UTC
      That probably works with Apache::PerlRun but it is broken with Apache::Registry. I don't know where the disconnect is. Archive::Zip::SimpleZip streaming to STDOUT gets lost.

        Just tried the simple simple version of your script (shown below) using both ModPerl::Registry and ModPerl::PerlRun. Both worked as expected. I could download myarchive.zip from my apache server without any trouble.

        Perhaps you could share more details on what isn't working?

        use Archive::Zip::SimpleZip ; print "Content-Disposition: attachment; filename=\"myarchive.zip\"\r\n +"; my $z = new Archive::Zip::SimpleZip '-', Stream => 1; my $fh = $z->openMember(Name => "myarchive.zip"); print $fh "hello world\n"; close($fh); $z->close();

        That probably works with Apache::PerlRun but it is broken with Apache::Registry. I don't know where the disconnect is. Archive::Zip::SimpleZip streaming to STDOUT gets lost.

        Hi,

        What if you use  my $z = Archive::Zip::SimpleZip->new(*STDOUT, Stream => 1 ); ?

        Does print "\nhello\n" ; get printed to the client?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1184804]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-19 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found