tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kulessa <kule...@flexsecure.de>
Subject HttpServletRequest - getHeaders() vs getCookies()
Date Tue, 08 Jul 2014 07:48:33 GMT
Hi,

we are running a server on Apache Tomcat 7.0.29 with usage of the 
servlet-api 3.0.1.
 From one of our customers we received a bug report that in certain 
times an IOException (Stream is closed)
is thrown while reading the data from a HttpServletRequest.

After some investigation we added some logging and now we see the 
following information:
First we logged the headers of the http request (by using 
HttpServletRequest#getHeaders()) and
we see a JSESSIONID cookie with a value of 'A'.
After this we use HttpServletRequest#getCookies() to log the cookies as 
well.
Here we only see a JSESSIONID cookie with a value of 'B'.

The requested sessionId from the servletRequest has value 'A' as well.

My question is: How can this be?
How is it possible that getCookies returns a cookie that is not defined 
in the header of the http request?
Where does this cookie come from? And were did the cookie go that was 
defined in the header?

Regards,
Simon Kulessa.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message