Forum Discussion

MDPF52_180608's avatar
MDPF52_180608
Icon for Nimbostratus rankNimbostratus
Feb 06, 2015

iRule problem with concatenation output

Hi DevCentral,

 

I have a question for you, How i can save in a variable the result of three variables separated by the character ; without any truncate issue ( i need to save it in a cookie that i expect to be like the following pattern : " Cookie abc Value: variable1;variable2;variable3) If I use the following syntax:

 

set printout "$variable1;$variable2;$variable3"

 

and then save the value in a cookie created by the F5, the result save only the first variable of the $printout maybe because the character " ; " was not passed as a string.

 

Thanks in advance,

 

M.

 

4 Replies

  • Hello, maybe you can use "set" or "append" first and then printout the result? Or use escaping of the ";"? Jozef
  • if i set the cookie with the value of the printout the value will be truncated
  • if i set the cookie with the value of the printout the value will be truncated
  • you could try

    set printout [URI::encode "${variable1};${variable2};${variable3}"]
    and see if that helps. Not sure if the browser will decode the value or not though by default. (The brackets ensure your variable name isn't getting caught up with characters that appear directly after it)