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 } } }

I ended up going this path and it tested good so far! IE9 was our issue. All IE9 users had Chrome plugin installed and needed Chrome=1 in header to get newer app GBL pages to work with old version off IE.

when HTTP_REQUEST {

set uri [HTTP::uri]

set replace_content 0

if { [HTTP::header "User-Agent"] contains "IE 9" } {

  if { ($uri contains "PT_LANDINGPAGE.GBL") ||

       ($uri contains "_FL.GBL") ||

       ($uri contains "_FLU.GBL")} { 

     set replace_content 1 

    Disable the stream filter by default  

   STREAM::disable

   HTTP::header remove "Accept-Encoding"

 }

}

}

when HTTP_RESPONSE {

if {$replace_content equals “1”} {

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
 }

}

}