How to enable TCL 8.5.x for iRules on 12.x

Hi,

According to SOL36322151 TCL Version 8.5 seems to be supported since 12.x.

So how do I enable it for use in iRules?

If I try to use some of the new features (e.g. “dict” or “switch -regexp -matchvar…”) in the iRules editor, it still gives me the same errors when saving as if it still used the old TCL 8.4 version.

I am running BIG-IP 12.1.1 Build 0.0.184

Regards,

Marc

Hi,

In the SOL36322151, new supported commands are listed. dict is listed as non supported command even if this is a new command in tcl 8.5.

there is no way to enable it.

Hi,

you can open a support case for this.

but in your code, I do not see why you need externalpath.

and, when using matchvar in tcl, the value is a list of match. the first match is :

[lindex $externalpath 1]

instead of matchvar, you can use:

regsub -nocase "/extpath/" [HTTP::path] $internalpath newuri
HTTP::uri $newuri

another thing. “.*$” does not make sense. it search any character from match string to the end of the uri.

you should set regex : {^(/extpath/)} instead of {^(/extpath/).*$}