Troy_94246
Mar 27, 2015Nimbostratus
Add Hedder data to MSIE9 and devices with specific uri
I am trying to help out application team role out new application to user base that still runs IE9. User desktops are not going to be upgrade in time to application role out. Application works with IE9 Chrome plugin and if Header has is added to header. Example 1 makes change to header but addes ti to everyone everywhere. example 2 is an attempt to add the added logic and it doesn't work.
Example 1 makes change but requires logic to just apply to IE9 and specfic URI not all browsers and pages
when HTTP_REQUEST { STREAM::disable HTTP::header remove "Accept-Encoding" } when HTTP_RESPONSE { if {[HTTP::header value Content-Type] contains "text"}{ STREAM::expression {@@ @} STREAM::enable } }
Example 2
when HTTP_REQUEST {
set replace_content 0 if { [class match [string tolower [HTTP::uri]] contains DATAGROOUP_GLB] } {
set replace_content 1 } } when HTTP_RESPONSE {
if {([string tolower [HTTP::header User-Agent]] contains "msie9") and ($replace_content equals "1")} { Disable the stream filter by default
STREAM::disable HTTP::header remove "Accept-Encoding" Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{ Replace
STREAM::expression {@@ @} Enable the stream filter for this response only STREAM::enable } } }