Forum Discussion
Marc_13733
Feb 16, 2010Nimbostratus
Thanks Aaron, works perfectly!
One more thing - we want this modification to only occur when the querystring contains the word "attachment". When we do this:
when HTTP_RESPONSE {
set querystring URI::query
if { $querystring contains "attachment=1" } {
HTTP::header replace Content-Disposition [string map -nocase "inline attachment" [HTTP::header Content-Disposition]]
}
}
We get an error "command is not valid in current event context". Apparently we can't query the querystring in a HTTP_RESPONSE block. How else can we do this header modification based on the URI?