views:

409

answers:

1

I have a J2EE webapp which is used to download a generated PDF served by an HTTP servlet. When running over SSL in production the users are getting the error message

There was an error opening this document. The file cannot be found.

in Acrobat when they choose to open the file in the browser instead of saving it to file. If they save the file there is no problem. The error only occurs in production which is an Oracle Application Server cluster behind an F5 BIG-IP router. In test the problem does not occur even over https.

The current headers being sent are

Content-disposition: attachment; filename=myfile.pdf
Pragma: public
Cache-control: must-revalidate

Has anyone experienced this problem in the past? What values should I be using for these headers? Should I be using inline content-disposition instead of attachment?

+1  A: 

It may help to ensure that the URL being called ends in ".pdf", or even "filename.pdf", as IE (aparently) uses the URL to determine filetype.

Moose Morals