TJ_Vreugdenhil
Oct 02, 2012Cirrus
iRule syntax issue
I have tried to validate the iRule below, but it errors with:
[braces are required around the expression][when HTTP_RESPONSE {
Cookie Management Verification
when HTTP_RESPONSE {
if {[HTTP::cookie count] > 0} {
set maxCookieSize [class match -value "CookieMaxSize" equals COOKIE_INFO_LIST]
foreach cookie_name [HTTP::cookie names] {
if {![class match $cookie_name equals MASTER_COOKIE_JAR_LIST]}{
log local0.info "INVALID SET-COOKIE DETECTED – Cookie:$cookie_name"
}
set cookieSize [string length [HTTP::cookie $cookie_name]]
if [ $cookieSize > $maxCookieSize ] {
log local0.info "INVALID SET-COOKIE SIZE – $cookieSize for Cookie:$cookie_name"
}
}
}
}