Forum Discussion

smp_86112's avatar
smp_86112
Icon for Cirrostratus rankCirrostratus
Apr 16, 2010

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?
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    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/IntroductionComments

     

     

    Aaron