[opencms-dev] Setting Content Disposition and Content Type

Brett Beaumont brett.beaumont at sytec.co.nz
Sun Mar 13 21:58:57 CET 2005


All,

We're creating a template that can stream binary content back to the browser. In order to do so, I need to set the content type and content disposition as follows:

response.setContentType("application/x-download");
response.addHeader("Content-Disposition", "attachment; filename=test.zip");

In general, this approach would work, but it seems like OpenCMS is removing the headers from the response (or never adding them in the first place). Has anybody tried this before or anyone know what the problem could be?

Regards,

Brett Beaumont 
Technical Consultant 
Sytec Resources Limited 

Phone	+64 4 473 5805
Fax 	+64 4 473 5812
Email 	<mailto:brett.beaumont at sytec.com>
WWW 	http://www.sytec.com

Important:  This electronic mail message and attachments (if any) are confidential and may be legally privileged.  If you are not the intended recipient please contact us immediately and destroy this message.  You may not legally copy, disclose, disseminate or use the contents in any way.  Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050314/e9490a27/attachment.htm>


More information about the opencms-dev mailing list