Thanks for the replies, and sorry for not showing the code. I had the following code in a dhandler that was causing trouble with IE:
<%args> $arg1 => '' </%args> <%init> my ($order) = ($r->filename =~ /.*?\/letters\/(.*?)\.pdf/gi); my $output = generate_pdf($order, $arg1); #$r->content_type('application/pdf'); $m->clear_buffer; $m->print($output); $m->abort; </%init> <%flags> inherit => undef </%flags> I changed the code to: <%args> $arg1 => '' </%args> <%init> $m->clear_buffer; my ($order) = ($r->filename =~ /.*?\/letters\/(.*?)\.pdf/gi); my $output = generate_pdf($order, $arg1); $r->content_type('application/pdf'); $r->headers_out->{'Content-Disposition'} = "attachment; filename=$order.pdf"; $r->headers_out->set('Content-Length' => length($output)); $r->send_http_header; $m->print($output); $m->abort(OK); </%init> <%flags> inherit => undef </%flags> And it still wouldn't work for IE. The error I get is: 1. File Download Security Warning - it asks if I want to download the file. 2. I click on save or open and I get the "file download" popup but I get another popup immediately after saying: "IE cannot download filename.pdf from www.domain.com. IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later." I click on "OK" and it aborts the download. Now the above error always happened with a http:// request, but I found that it works fine if the request is https://. Go figure. So I guess I'll accept that and always link to it using ssl. Wonder why that is though. Justin Andreas Marienborg wrote: > At work we serve custom PDF files with the following component: > > $m->clear_buffer; > $r->content_type("application/pdf"); > $r->headers_out->set('Content-Length' => length($data)); > $r->send_http_header; > $m->print($data); > $m->abort(OK) > > where $data is the PDF document as a scalar. > > and for future questions, a code snippet might help alot in aiding you > better :) > > > andreas > > > On 27. jul. 2006, at 23.10, J Cook wrote: > >> I am generating a pdf on the fly and serving it up with mason, I set the >> headers out -> content type application/pdf and this works fine in >> Mozilla and Firefox but Internet Explorer throws an error and won't >> proceed with the download. Anyone have any clue as to why this is? >> >> Justin >> >> ------------------------------------------------------------------------- >> >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >> _______________________________________________ >> Mason-users mailing list >> Mason-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/mason-users > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users