Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

Error saving iRule because of comment

I am testing the upgrade of our 9.3.1 config to 10.1.0, and ran across an error that prevents the config from loading in v10. I figured out how to fix the error, but wanted to retain the existing code during my testing. So I simply commented out the problem line. However this commented line prevents the iRule from updating:

when HTTP_RESPONSE {
     # switch -glob [string tolower [HTTP::host]] {
     switch -glob [string tolower [HTTP::header "Host"]] {
        (do some stuff)
   }
}


01070151:3: Rule [junk] error: line 1: [parse error: missing close-brace: possible unbalanced brace in comment] [{ # switch -glob [string tolower [HTTP::host]] ..........

The TCL guide says # are valid comments - what am I missing?
0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
I think even in comments the braces must be balanced:

See this page for details and some examples:
http://en.wikibooks.org/wiki/Tcl_Programming/Introduction#Comments

Aaron
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Wow, news to me. Thanks for the doc reference.
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Wow, good news, Thx for sharing!

0