tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcinek, Blazej" <blazej.marci...@roche.com>
Subject Cookie handling issue (bug?) in Tomcat 5.5.26
Date Tue, 19 Feb 2008 12:00:31 GMT
Hi,
 
I've just tried running Tomcat 5.5.26 and I've noticed a problem with
Cookie handling (though I'm not sure on which side it should be
corrected).
 
In our application we use cookies containing '=' (equals) characters in
values - this used to work until now, but fails on 5.5.26.
I've ran a little investigation and it appears that setting cookie with
= chars in value works fine (cookie is set properly with full value),
but when obtaining the cookie value later (via request.getCookies()...
getValue() sequence), the returned cookie value is truncated at the
first = character inside.
 
I.e. if I set the cookie "tmp" with value "a=b", I can see on HTTP
monitor that cookie was properly sent to browser, and again to server in
following request (with full "a=b" value) - but the getValue() method
returns "a" instead. 
 
Since the addCookie() works (and sets the value without complaining),
the latter truncation in get Value() looks like a bug in cookie parser. 
Can anyone confirm this? 
 
Kind regards,
 
Blazej Marcinek

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message