The example worked for me:
when RULE_INIT {
test the string map replacement
set aString ""
unset aString
log local0. " "
set aString "/amserver/UI/Login?goto=http%3A%2F%2Fsecureinternal-d.tmi.telus.com%3A80%2Feperformance%2FLogin.do%3FLANGUAGE%3DEN"
log local0. "original: $aString"
log local0. "new : [string map {goto=http% goto=https% %3A80% %3A443%} $aString]"
}
when HTTP_REQUEST {
test the actual replacement in the URI
if { [HTTP::uri] contains "goto"} {
HTTP::query [string map {goto=http% goto=https% %3A80% %3A443%} [HTTP::query]]
log local0. "this doesn't get updated: [HTTP::query]"
log local0. "this is the actual value that gets set: [string map {goto=http% goto=https% %3A80% %3A443%} [HTTP::query]]"
}
}
Rule : original: /amserver/UI/Login?goto=http%3A%2F%2Fsecureinternal-d.tmi.telus.com%3A80%2Feperformance%2FLogin.do%3FLANGUAGE%3DEN
Rule : new : /amserver/UI/Login?goto=https%3A%2F%2Fsecureinternal-d.tmi.telus.com%3A443%2Feperformance%2FLogin.do%3FLANGUAGE%3DEN
Rule string_map_test_rule : this doesn't get updated: goto=http%3A%2F%2Fsecureinternal-d.tmi.telus.com%3A80%2Feperformance%2FLogin.do%3FLANGUAGE%3DEN
Rule string_map_test_rule : this is the actual value that gets set: goto=https%3A%2F%2Fsecureinternal-d.tmi.telus.com%3A443%2Feperformance%2FLogin.do%3FLANGUAGE%3DEN
Are you sure you're using string map in the form:
set updated_string [string map {find_this replace_with_this} source_string]
Aaron