tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat 6.0.18 unsupported character in cookie
Date Tue, 18 May 2010 19:03:08 GMT
THOIBA.THOUDAM@FT.COM wrote:
> 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 :
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/tomcat/util/http/ServerCookie.html

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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message