in reply to The Problem & My Solution (please comment)
in thread Tar File To Web Browser

I ran into this a while back, so the details are fuzzy; merlyn had an article in WebTechniques (I hope; found it Programming w/ Perl) which he talked about doing something like this, and the exercise to the reader was to improve it to use compress. I tried and ran up against the above problem. The Author of Archive::Tar was quite helpful, but I don't recall (sorry) the result (use a type glob?) but you could probably contact him for a fix. I believe I did something like the above, hide the seek (ahem) and lived w/ it.

Update I found the Author's reply (here for the heck of it):
--- quote
From: Stephen Zander gibreel@pobox.com>
To: Andy Bach root@wiwb.uscourts.gov>
Subject: Re: Archive::Tar

>> "Andy" == Andy Bach root@wiwb.uscourts.gov> writes:
We just send back an http header saying tar.gzip file to follow and dump the output to STDOUT and the browser handles the saving, but I couldn't get $tar->write() to use stdout easily, w/ compression on.

Try using ->write(\*STDOUT) to force the output to the pre-existing STDOUT handle. This should Just Work. If it doesn't I'd appreciate the output of any error logs from apache and information on your environment (eg, apache version perl version, Archive::Tar version, whether you're using mod_perl etc)

Thanks
Stephen

"Farcical aquatic ceremonies are no basis for a system of government!"
--- end quote

a

  • Comment on Re: The Problem & My Solution (please comment)