Forum Discussion
Dec 17, 2015
Hi Kai,
there are at least two aspects to consider:
1) a URI will start with a slash
/
character. So the validation has to match a string of i.e "/foo", "/foo*", "*foo"
Without a literal slash or a wildcard as
*
in case you are using globbing you will not get a match.
2) The function
HTTP::cookie names
returns a list. A list cannot be matched versus a jump table as used by the switch
command.
You want to use exact matches for an exact cookie name by using i.e.:
foreach cookie_name [HTTP::cookie names] {
switch $cookie_name {
"foo_named_cookie" {
return
}
"bar_named_cookie" {
return
}
}
}
It will be important to use a
return
after running the action for a match to exit the evaluation.
Thanks, Stephan