You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Fergus Gallagher <Fe...@OrbisUK.com> on 2000/02/01 19:35:06 UTC

Cookies: different behaviour on Apache & Tomcat

If, using the CookieExample servlet (for example), on Tomcat, I set a
cookie 

	NAME=ONE+TWO

then, on getting this back from the browser, 

	request.getHeader("COOKIE") -> "NAME=ONE+TWO"
and
	request.getCookies()[0].getValue() -> "ONE+TWO"

as expected.

But if the web server is Apache, the latter returns "ONE TWO", almost as
if there is some sort of URL 
decoding going on.  

But the doubly weird thing is this only happens with Apache (various
versions, OSs), not with 
Tomcat nor the JDSK2.0/2.1 servlet runners.

Anybody know what's going on?  This obviously messes up any Base64
encoded values.

Fergus

P.S. I guess this question is more about Apache & Servlets than Tomcat &
Servlets so apologies if 
this is not the right place.

-- 
Fergus Gallagher          Tel: +44 (20) 89 87 07 17
Orbis                     Fax: +44 (20) 87 42 26 49
The Swan Centre           email: Fergus.Gallagher@orbisuk.com
Fishers Lane              Web: http://www.orbisuk.com
London W4 1RX / UK