Much progress has been made. What I found is incredibly frustrating, but I assume it's because I was (somehow) "doing it wrong."
The goal was to dynamically call a proc named
http_request
inside a rule that was named the same as an expected
[HTTP::host]
(something that would resolve to the virtual server and be handled by the rule). I have had much success with something very similar before where I set a variable based on a datagroup lookup and performed something simlar to
eval call [$variable]::procName
.
As indicated above, the variable substitution must not act how I think it should and the following not only does not work, but also crashes TMM on 11.6.0 HF3:
set host [string tolower [HTTP::host]]
set uri [string tolower [HTTP::uri]]
eval call [string tolower {HTTP::host}]::http_request $host $uri
My initial testing shows that defining the entire proc to call as a
string
works, but using variable substitution (
$host
instead of
[string tolower [HTTP::host]]
) when setting
http_request
below doesn't work. Not much testing has been done, yet, but the following appears to behave as I expect it:
set host [string tolower [HTTP::host]]
set uri [string tolower [HTTP::uri]]
set http_request "[string tolower [HTTP::host]]::http_request"
eval call $http_request $host $uri