Forum Bugs

malformed header from script

Alpha
Hi,

I have upload the Campaign Letter Generator application and Apache is returning the following error:

malformed header from script. Bad header=%PDF-1.4: campaign.pl


Please can somebody suggest a solution?

Many Thanks :)
mikeday
Check that these two lines are being executed:
print "Content-Disposition: attachment;filename=\"campaign.pdf\"\n";
print "Content-type: application/pdf\n\n";

The two trailing newlines tell Apache that is the last HTTP header and everything after that is the response body (eg. the PDF file).