dennypayne
Aug 03, 2006Employee
To quote or not to quote
I searched around the TCL reference and this forum and didn't see any discussion of this, maybe I'm missing something obvious but here goes...
Why is this valid:
when CLIENT_ACCEPTED {
if { [TCP::client_port] equals 80 } {
pool pool1
} else {
discard
}
}
when this isn't?
when CLIENT_ACCEPTED {
if { [IP::server_addr] equals 10.0.0.1 } {
pool pool1
} else {
pool pool2
}
}
The 2nd example errors out saying:
line 2: [parse error: PARSE syntax 62 {syntax error in expression " [IP::server_addr] equals 10.0.0.1 ": extra tokens at end of expression}
However if you put quotes around the address in the 2nd example ("10.0.0.1") it works fine. So why the difference? Do the dots not work in a TCL "word"?
Denny