Forum Discussion
Marc_13733
Nimbostratus
Feb 16, 2010Change Content Disposition from Inline to Attachment
Our DMS server returns only inline disposition headers:
Content-Disposition: inline; filename=somefile.pdf
We need to replace this header with the following:
Content-Disposition...
hoolio
Cirrostratus
Feb 16, 2010Great that you figured it out. You could also try something like this:
when HTTP_REQUEST {
Check if the query string contains a parameter named attachment with a value of 1
if {[URI::query [HTTP::uri] "attachment"] == 1}{
set check_response 1
} else {
set check_response 0
}
}
when HTTP_RESPONSE {
if { $check_response } {
HTTP::header replace Content-Disposition [string map -nocase "inline attachment" [HTTP::header Content-Disposition]]
}
}
Aaron
edited to add HTTP::query to URI::query command...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
