Forum Discussion
Ian_Stewart_390
Nimbostratus
Jan 05, 2005Compress::Enable
Hi Everyone,
I would like to selectively compress HTTP responses from our server to the client browser. Because of the following IE bugs:
For IE 5.5 : http://support.micr...
Ian_Stewart_390
Nimbostratus
Jan 05, 2005Here's what I've tried:
A single rule:
when HTTP_REQUEST {
set hdr_user_agent [string tolower [HTTP::header User-Agent]]
if { $hdr_user_agent contains "firefox" or $hdr_user_agent contains "msie 6.0" } {
set client_ok 1
log local0. "Header agent $hdr_user_agent compressed"
}
else {
set client_ok 0
}
}
when HTTP_RESPONSE {
set hdr_content_type [string tolower [HTTP::header Content-Type]]
if { $hdr_content_type contains "text" or $hdr_content_type contains "message" } {
if { $client_ok == 1} {
COMPRESS::enable
}
}
}
And other than enabling compression in the HTTP profile as selective, no other settings.
But that fails with "TCL error: Rule Selective_Compression - Error: Unknown error (line 1) invoked from within "COMPRESS::enable" "
----------------------------------------------------
I've also tried this:
when HTTP_REQUEST {
set hdr_user_agent [string tolower [HTTP::header User-Agent]]
if { $hdr_user_agent contains "firefox" or $hdr_user_agent contains "msie 6.0" } {
COMPRESS::enable
}
}
And then configuring in the HTTP profile to only compress certain content (again, selectively), but I get the same error message.
What am I doing wrong?
-Ian
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
