Forum Discussion
Gerardo_Garcia_
Nimbostratus
May 21, 2008Content Disposition
We have a web application that includes Microsoft Office documents links.
When you click on the document using IE you will see an embedded document in your browser.
We are getting all kind of errors
The vendor does offer that functionality to download instead of a regular link.
Is there a way to modify the content disposition from whatever it is to download for the Microsoft Office Documents?
- Colin_Walker_12Historic F5 AccountI can't recall off the top of my head whether it's the content-disposition header or a different one you'd want to change to stop it from automatically viewing the content in the browser, but that shouldn't be too hard to track down. If it is the content-disposition header, you'd probably want to change it to attachment instead of inline.
- Gerardo_Garcia_
Nimbostratus
Can you point to a place with a sample? - hoolio
Cirrostratus
I'm not sure what your exact criteria is for rewriting the header. Here is an example that would rewrite every Content-Disposition header if it's present in the response:when HTTP_RESPONSE { Check if the response has a Content-Disposition header if {[HTTP::header exists Content-Disposition]}{ Replace the existing Content-Disposition header with one that prompts the user to download the content HTTP::header replace Content-Disposition "attachment; filename=" } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects