meja_127775
Nov 13, 2005Nimbostratus
enable compression if parameter exists in content type
Newbie here. I'm trying to compress data with content type "text/html;charset=UTF-8". I do not want to compress the data if the parameter is missing i.e content type "text/html" should not be compressed but "text/html;charset=UTF-8" should.
I've tried using the following rule but without success.
when HTTP_RESPONSE {
set content_type [string tolower [HTTP::header Content-Type]]
if { $content_type contains "text/html;charset=UTF-8"}{
COMPRESS::enable
}
}