tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat 6.0.18 unsupported character in cookie
Date Tue, 18 May 2010 19:03:08 GMT
> Hi Mark,
> Thanks again. Your suggestion sounds like a way forward to solve our 
> problem. I just tried it and it works. Our cookie containing non-spec 
> complaint cookie values are being created without any double quotes. 
> Could you please also let me know the difference between 
> response.setHeader("Set-Cookie", "name=value") and 
> response.addCookie(cookie)? Are there any disadvantage of using 
> response.setHeader() to set cookies?
Have a look here :

If you set a header via .setHeader(), you set a name and a value, as 
strings.  You can set whatever you want in this way, and there is no 
checking of what you set. Which is exactly why you can set a 
non-specs-compliant (in other words invalid) cookie in this way.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message