in reply to Printing to a Variable

You can get around the IE stupidiy in a file download by explicitly setting the content-type to "application/download". Here is the code I use (using Mason, but I'm sure you can extrapolate):
my $subr = $r->lookup_file($file); return 404 unless -f $file and $subr->status == 200; $r->content_type("application/download"); $r->header_out('Content-disposition' => "attachment; filename=\"$fil +e\""); $r->send_http_header; return 200 if $r->header_only; $subr->run; $m->abort;

Hope that helps

-pete
"I am Jack's utter lack of disbelief"

Replies are listed 'Best First'.
Re: Re: Printing to a Variable
by Dr. Mu (Hermit) on Mar 15, 2002 at 06:31 UTC
    Yes, it did help -- for IE5.5 anyway -- and that was my main concern. Frankly, I wasn't expecting it to, as I've tried more HTTP header mumbo-jumbo than you can imagine. The PHP folks are up against the same problem, and there's a plethora of similar incantations in their newsgroups -- none of which worked for me.

    But yours did. Thank you!

      No problem, I'm glad my wrestling match with it is saving others from having to wrestle it.

      -pete
      "I am Jack's utter lack of disbelief"