Forum Discussion
Mark_Stradling_
Dec 03, 2013Cirrus
list element in quotes followed by <something> instead of space
The following iRule occasionally produces errors:
foreach cookie [HTTP::cookie names] {
switch -glob -- $cookie {
"xxxxx" -
"xxxx" -
"xxxx" -
"xyxyxyx" -
...
Mark_Stradling_
Dec 03, 2013Cirrus
This seems to work
when HTTP_REQUEST {
set i 0
set clist [HTTP::cookie names]
if { [catch {set n [llength $clist]}] } {
log local0. "Error. Bad entry in cookie names: $clist"
return
}
while {$i < $n} {
switch -glob [lindex $clist $i] {
"xxxxx" -
"xxxxxx" -
"xxxxxx" -
"xxxxx" -
"xxxxx*" -
"xxxxxxxxx*" {
HTTP::cookie remove $cookie
}
}
incr i
}
}
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