Chris_Hotchkiss
Oct 27, 2015Nimbostratus
iRule snippet insertion 11.5.1
Long story short I have an irule to insert some snippets in the HTTP response but instead of inserting the contents of the variables, it is just using the actual string text. The log output shows $y and $stream_expression values as @$head_token@$detection_snippet@ instead of the contents of those variables which check out fine in section 4. Section 5 is the problem area. Any advice would be much appreciated.
Section 3: Identify Location Tokensset head_token ""
End of section 3
Section 4: Identify Snippet iFiles
set detection_snippet "[subst -nocommands -nobackslashes [ifile get Test_locdrive_js]]$head_token"
set collection_snippet "[subst -nocommands -nobackslashes [ifile get Test_exout_js]]$head_token"
set session_rst_snippet "[subst -nocommands -nobackslashes [ifile get Test_sessionrst_js]]$head_token"
set uid_collect_snippet "[subst -nocommands -nobackslashes [ifile get Test_setdata_js]]$head_token"
set perm_uid_snippet "[subst -nocommands -nobackslashes [ifile get Test_runvar_js]]$head_token"
log local0. "Trusteer-assign snippet variables"
log local0. "$head_token"
log local0. "$detection_snippet"
log local0. "$uri(1)"
End of section 4
Section 5: Modify URL and Snippet Array
array set snippet_insertion {
"[subst $uri(1)]" @$head_token@$detection_snippet@
"[subst $uri(2)]" @$head_token@$uid_collect_snippet@@$head_token@$perm_uid_snippet@
}
End of section 5 Do Not Modify foreach {x y} [array get snippet_insertion] {
if {$loc == "[subst $x]"} {
log local0. "$x"
log local0. "$loc"
log local0. "$y"
set stream_expression $y
log local0. "$stream_expression"
STREAM::expression [subst $stream_expression]
STREAM::enable
log local0. "Trusteer enabling stream"
}
}
}
}
End of 'Do Not Modify' Section
End of iRule