in reply to Re: Sending a file through STDOUT using HTTP
in thread Sending a file through STDOUT using HTTP

Excellent points and I definitely appreciate the info. I now have:
$zip->addTree( $path, '' ); print "Content-type: application/zip\n" . "Content-Disposition: attachment;filename=\"$filename\"\n\n"; binmode STDOUT; $zip->writeToFileHandle( \*STDOUT, 0 );
Unfortunately the browser is still seeing it as a "httpd/unix-directory" and not getting a filename. I tried both with and without quotes on the filename. Any other ideas? Stupid MIME types...

Replies are listed 'Best First'.
Re^3: Sending a file through STDOUT using HTTP
by hcubed (Initiate) on Feb 18, 2005 at 16:28 UTC
    Sorry, forgot to login. The above post was me.
Re^3: Sending a file through STDOUT using HTTP
by Errto (Vicar) on Feb 18, 2005 at 17:34 UTC
    I did a quick search on Google and it looks like the "httpd/unix-directory" think might be an Apache configuration issue. Are you sure your CGI code is actually getting executed? Maybe add something like print STDERR "My CGI called here" and see if that message shows up in your Apache error log.
      Well I'm pretty sure it gets called because the file does actually send. I printed to STDERR anyway and it showed up in the error_log correctly. Hmmm.