How to send a cookie without having it CGI escaped


I’m trying to get a cookie to store in the format [email protected]=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 [email protected]=value2 looks like.

How can I set it without it being escaped?

Thanks in advance,


I ended up using

headers[‘Set-Cookie’] = ‘[email protected]=value2;; path=/’