I'm sure I'm doing something wrong, but when I use a keylget when the key has embedded dashes, I get an error. This only happens when the code is executed in a translate thread. At the tcl command line, it works fine.
example -
set headers {{content-transfer-encoding 7bit} {content-type text/plain;rntcharset="iso-8859-1"}}
set criteria content-transfer-encoding
keylget headers $criteriareturns "7bit".
However when I run this in a translate tps (pre-proc), I get this error:
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: search_criteria: content-transfer-encoding,content-disposition,content-type
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: criteriaList: content-transfer-encoding content-disposition content-type
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: criteria_count: 3
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: attachment att_number: 0
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: attachment 0 headers: headers {{content-transfer-encoding 7bit} {content-type text/plain;rntcharset="iso-8859-1"}}
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: attachment 0 header_keys: content-transfer-encoding content-type
[tcl :out :INFO/0:RHIO_inbound_xlate:07/08/2015 09:22:08] RHIO_inbound_USR: attachment 0 checking criteria content-transfer-encoding
[xlt :xlat:ERR /0:RHIO_inbound_xlate:07/08/2015 09:22:08] Tcl error:
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] msgId = message0
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] proc = 'RHIO_inbound_USR'
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] args = ''
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] result = ''
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] errorInfo: '
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] keyed list entry must be a valid, 2 element list, got "headers"
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] while executing
[xlt :xlat:ERR /0:RHIO_inbound_xlate:--/--/---- --:--:--] "keylget headers "$criteria""
It is not the keyed list ($headers) that is the problem, it is the key. When I change the criteria to use underscores instead of dashes, it works.
Has anyone seen this?
Peter