Forum Discussion
Error: use curly braces to avoid double substitution
Upgrading from 11.3 to 11.6 I'm encountering this error:
warning: [use curly braces to avoid double substitution][[string length "/contact"]]
Code:
HTTP::path /[ string range [HTTP::path] [expr [string length "/contact"] +1 ] end ]
I've tried:
HTTP::path /[ string range [HTTP::path] [expr {[string length "/contact"] +1 }] end ]
without success.
2 Replies
- Arie
Altostratus
I'm truly baffled now. To make the changes I used the iRule editor, but after some time I noticed that the errors I was seeing when I ran load sys config verify in TMSH the changes weren't reflected in the error message.
Eventually I made the changes via the GUI and suddenly the verification passed.
To make it even more interesting, a couple of other rules also caused the same error message and I had updated those as well (added braces) via the iRule Editor. Those also kept showing with errors when I ran the verify command, but after I saved that one iRule in the GUI all of them suddenly passed.
iRule Editor problem?
- StephanManthey
Nacreous
Hi Arie,
I just gave it a try on v11.6.0HF3:
when HTTP_REQUEST { log local0. "path: [HTTP::path]; extracted <[string range [HTTP::path] [expr {[string length "/contact"] + 1}] end]>" HTTP::path "/[string range [HTTP::path] [expr {[string length "/contact"] + 1}] end]" log local0. "new path: [HTTP::path]" }Log output as expected:
tail -n 0 -f /var/log/ltm | grep -oE 'Rule .*$' Rule /Common/rule_string : path: /contact/stephan; extracted Rule /Common/rule_string : new path: /stephanVerification fine as well:
tmsh list ltm rule rule_string > /shared/rule_verify tmsh load sys config merge verify file /shared/rule_verify Validating configuration... /shared/rule_verifyThanks, Stephan
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
