How to send a cookie without having it CGI escaped


I’m trying to get a cookie to store in the format key=value@key2=value2 ( compatibility reasons over which I have no control ).

However, when the cookie get’s set, it is stored as key%3Avalue%40key2%3Avalue2 which is what the CGI.escaped version of key=value@key2=value2 looks like.

How can I set it without it being escaped?

Thanks in advance,


I ended up using

headers[‘Set-Cookie’] = ‘cookiename=key=value@key2=value2;; path=/’