Originally posted by William Brogden:
Why did you do this:
in my experience, specialized formats like pdf require an exact content length.
Originally posted by Tim Holloway:
If you didn't have the setContentType originally, that would have been a problem. The Content-Disposition header tells WHAT to do with the output (display in browser or download as file), but not what the output IS - which in this case meant "data to be displayed using the Acrobat (pdf) plug-in".