Emre_27149
May 22, 2011Nimbostratus
persistansy and compression
Hi,
I need to your ideas .We tested the bellow irules and it worked.But after get the production some clients complained session persistent and compression.There is a relationship persistency rule that if cookie is disabled then are used session id for persestancy. We compress all file types except msie 6 and some compressed file types.
Thank you.
persistency rule
when HTTP_REQUEST {
if { [HTTP::cookie "BSESSIONID"] ne ""} {
persist uie [string tolower [HTTP::cookie "BSESSIONID"]]
log local0. "deneme"
}
else {
set bsess [findstr [string tolower [HTTP::path]] "bsessionid=" 11 ""]
if { $bsess != ""} {
persist uie $bsess
log local0. "deneme2"
}
}
}
when HTTP_RESPONSE {
if {[HTTP::cookie "BSESSIONID"] ne ""} {
persist add uie [string tolower [HTTP::cookie "BSESSIONID"]]
log local0. "deneme3"
}
}
compression rule
when HTTP_REQUEST {
if { [HTTP::header User-Agent] contains "MSIE 6" }
{
log local0. "Header agent [HTTP::header User-Agent] NOT COMPRESSED"
COMPRESS::disable
event disable all
}
else
{
log local0. "Header agent [HTTP::header User-Agent] COMPRESSED"
COMPRESS::enable }
}
when HTTP_RESPONSE {
if {[HTTP::header Content-Type] contains "png" ||
[HTTP::header Content-Type] contains "jpg" ||
[HTTP::header Content-Type] contains "jpeg" ||
[HTTP::header Content-Type] contains "exe" ||
[HTTP::header Content-Type] contains "swf" ||
[HTTP::header Content-Type] contains "flw" }
{ log local0. "Header agent [HTTP::header Content-Type] PNG NOT COMPRESSED"
COMPRESS::disable
}
else
{
log local0. "Header agent [HTTP::header Content-Type] OTHERS COMPRESSED"
COMPRESS::enable }
}