Forum Discussion
TJ_Vreugdenhil
Cirrus
Oct 02, 2012iRule 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_RESPONS...
Michael_Yates
Nimbostratus
Oct 02, 2012I had to retype it from scratch to get it to behave and only alert on the DataGroup Names.
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. "INVALID SET-COOKIE DETECTED - Cookie: $cookie_name"
}
set cookieSize [string length [HTTP::cookie $cookie_name]]
if { $cookieSize > $maxCookieSize } {
log local0. "INVALID SET-COOKIE Size - $cookieSize for Cookie:$cookie_name"
}
}
}
}
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
