in reply to Sending a file through STDOUT using HTTP

You need to specify the content type as application/zip:

print "Content-type: application/zip\n" . "Content-Disposition: attachment;$filename\n\n";

Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)

Replies are listed 'Best First'.
Re^2: Sending a file through STDOUT using HTTP
by hcubed (Initiate) on Feb 17, 2005 at 22:01 UTC
    That's what I thought too. I guess I should've included the fact that I've tried several different MIME types but that never seems to affect what the browser thinks it is. No matter what headers I put in there it always just thinks it's an "httpd/unix-directory" with no filename.

      Just noticed this too. Change your content-disposition line as follows:

      "Content-Disposition: attachment; filename=\"$filename\"\n\n";

      Ted Young

      ($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)
        I really appreciate the fast replies but still no dice. I wonder if the browsers don't take that content-disposition stuff for face value and actually look at what's coming through. I'm sending a stream and not an actual file that exists on my system and I think that might be causing some trouble. Any other ideas?