Prevent cookie encoding in response.addCookie()
1 posts in topic
Flat View  Flat View

Posted By:   Valeriy_Aleksenko
Posted On:   Thursday, May 22, 2003 12:56 PM

There is a cookie forwarder which reads cookies from a remote site and forwards them to client's browser using response.addCookie(). The cookie is a Domino LtpaToken with session information encoded and may contain the '+' character. When the cookie is sent to the browser the symbol is encoded('%2b') breaking the session data. Is there a way to prevent such encoding?

Re: Prevent cookie encoding in response.addCookie()

Posted By:   Christopher_Schultz  
Posted On:   Friday, May 23, 2003 12:53 PM

Look at the java.net.URLDecoder class. You should be able to "url-decode" the cookie before you add it to the response.

If this cookie needs to go back through the servlet the other way, don't forget to perform the same processing.

About | Sitemap | Contact