Forum Discussion
bl0ndie_127134
Mar 27, 2005Historic F5 Account
You are very close. The header 'exist' command does not check the header value, it works only on the name. Lets scan the value for 'gzip' and convert it if one found.
rule gzip {
when HTTP_REQUEST {
if {[string first "gzip" [HTTP::header "Accept-Encoding"]] != -1} {
HTTP::header replace "Accept-Encoding" "gzip"
}
}
}
You may want to play around with adding back the 'event disable' command but I suspect that you might have to leave it out for keep-alive connections.