Forum Discussion
iRule “contains” syntax problem
I am having a problem with a User-Agent "contains" syntax.
User-Agent header captured in the logs is User-Agent = {OC/15.0.4719.1000 ('Skype for Business')}.
iRule statement contains "OC/15.0.4719.1000" works. If I specify contains "Skype" it does not seem to work. Is it because in the HTTP header it is enclosed in single quotes?
Thanks,
VK
4 Replies
- mikeshimkus_111Historic F5 Account
Hi, I just tested this with a Skype client and it's working for me. Can you post your iRule code here, please?
thanks
- VK_136173
Nimbostratus
Here it is:
set uagent [string tolower [HTTP::header User-Agent]] if { $uagent contains "lync" or $uagent contains "skype" } - mikeshimkus_111Historic F5 Account
Does it work if you use this syntax:
if { [HTTP::header "User-Agent"] contains "Skype" } { log local0. "Skype found!" } - VK_136173
Nimbostratus
Your pointed me in the right direction. It turns out that Skype also uses “MS-WebServices” user-agent when connecting to Exchange EWS. Thanks.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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