MB_58262
Oct 11, 2012Nimbostratus
string tolower and case insensitivity
We wanted to redirect to a particular request when the radius AVP such as User-Name ends with test.com. I implemented irule like the one below. From my understanding, it should be for case insensitive. so, when client request comes in with Test.com or TEST.COM or tEst.com, etc ...work, should still go to test_pool1
rule test_irule {
when CLIENT_DATA {
if { [ string tolower [RADIUS::avp User-Name] ] ends_with "test.com" } {
pool test_pool1
} else {
pool test_pool2
}
}
However, I noticed that when for example clien request has Test.com (e.g., capital T), it would go to test_pool2. The goal is to ensure that any request regardless of its case (upper or lower letter) containing a string such as "test.com" to always go to test_pool1, anything else would go to test_pool2
Any feedback would be really appreciated.
Thanks.