If you call 'event disable all' it will prevent any further iRule events from being run for the rest of the connection. That would break any further persistence on the connection.
Can you try this instead:
when HTTP_REQUEST {
if { [HTTP::header User-Agent] contains "MSIE 6" }{
log local0. "Header agent [HTTP::header User-Agent] NOT COMPRESSED"
set disable 1
} else {
log local0. "Header agent [HTTP::header User-Agent] COMPRESSED"
set disable 0
}
}
when HTTP_RESPONSE {
Exit this event in this iRule if we're disabling compression for IE6
if {$disable==1}{
COMPRESS::disable
return
}
switch -glob [HTTP::header Content-Type] {
"*png*" -
"*jpg*" -
"*jpeg*" -
"*exe*" -
"*swf*" -
"*flw*" {
log local0. "Header agent [HTTP::header Content-Type] PNG NOT COMPRESSED"
COMPRESS::disable
}
default {
log local0. "Header agent [HTTP::header Content-Type] OTHERS COMPRESSED"
COMPRESS::enable
}
}
}
Aaron