string match
4 TopicsInvalidate cookie on klient side
Hi, I have an issue with a client cookie that are causing some issues. To avoid pushing out a new application deploy in production I like to do a fix in the BigIP until we have the next maintenance where the application is patched. I found an example in this forum that I have modified. The cookie I like to modify exists in two different versions with the same name. So I need to check some parameters in the cookie to make sure that its the correct cookie. Name: METRICS Domain: .bar.com Path: / I have this iRule that I have one issue with. With I try to do a match class to the Path to be "/" I get the following error: 01070151:3: Rule [/Common/METRIC-cookie] error: Unable to find value_list (/) referenced at line 4: [class match [HTTP::cookie "Path"] eq "/"] when HTTP_REQUEST { Check the User-Agent string if { ([HTTP::cookie exists "METRICS"] && [class match [HTTP::cookie "Domain"] eq ".bar.com"] && [class match [HTTP::cookie "Path"] eq "/"])} { Set a variable to check the cookie in the response set check_cookie 1 } else { Set a variable to check the cookie in the response set check_cookie 0 } } when HTTP_RESPONSE { Check if cookie exists if { $check_cookie && [HTTP::cookie exists "METRICS"]}{ Update cookie expiry time HTTP::cookie expires METRICS 1388534400 } }382Views0likes1CommentBIG-IP : TCL to match member of set
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi There must be a better way : if { ( $segments_count == 3 ) || ( $segments_count == 4 ) || ( $segments_count == 5 ) } { if { [expr {$name_first eq "John"}] || [expr {$name_first eq "Greg"}] || [expr {$name_first eq "Brian"}] } { NOTE: I don't want to use class matches ( as these require external data-group-files )232Views0likes2CommentsFind whitespace in string
Hi, I have a string: set stringvar ["apple", "pear", "tomato" "grape", "banana", "strawberry"] How can I find the position of the double-space between tomato and grape? When I try: [string first {" "} $stringvar] It returns -1. I've also tried { } and {\" \"} Many thanks.223Views0likes1Comment