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="
}
}
I didn't test to see if you have to specify a filename. I doubt you do though. You might also want to limit when the header replacement is done by characteristics of the request or response. If you post an example of the response headers for a response you want to rewrite we might be able to give you more detailed suggestions.
Aaron