Forum Discussion
I don't understand [class match ... nor [class search - pls help
if I understand your requirement correctly, the behavior is expected since "/bar" does start with "/", i.e. when the code trace through the string "/bar" in the HTTP::uri, it sees that the string begins with a "/" and will match the variable with the data group
- Christian_MeissAug 01, 2016Nimbostratus
Ok more accurate:
i open http://host.domain.tld/ -> HTTP:uri equals /
[class match -value "/" starts_with path_dg] should return /bar
now i open http://host.domain.tld/bar -> HTTP:uri equals /bar
[class match -value "/bar" starths_with path_dg] should return nothing
But it's return also /bar.
I thinke my data group is a key:value pair and "class match" only looks into keys for matchings.
- Kai_WilkeAug 01, 2016MVP
The problem can be found in the "starts_with" contition of the [class] command, since every [HTTP::path] will have a leading "/" and therefor always matches (at least) the datagroup entry of "/" and then resolves to "/bar".
Cheers, Kai
Recent Discussions
Related Content
* 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