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?
You don't say whether you are using Mason with mod-perl or CGI, but if you are using Apache2/mod-perl2, you should be using the $r "global" object like this instead of setting the headers out: $r->content_type( 'application/pdf' ); See this FAQ entry: http://tinyurl.com/qkjcx The other thing is to check is that IE is stupid in that it tries to be cute and examines both the Content-Type header as well as the file extension, so you should set and explicit filename using something like this: $r->headers_out->{'Content-Disposition'} = "attachment; filename=generated.pdf"; That code is copied from an actual application that does just this. HTH John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ------------------------------------------------------------------------- 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