We have multiple copies of a web-app that is deployed on multiple paths on the same domain.
Example:
Each instance maintains a set of cookies each one defines its path as "/" + .getWebDirRoot() - i.e. /abc, /xyz, /abc123
When performing the following flow:
- Login to http://mydomain.com/abc
- Perform some activity
- Logout
- Login to http://mydomain.com/abc123
- Perform some activity <-- Failure
The last step fails since IE sent us the incorrect cookie - it sends the one for http://mydomain.com/abc instead of the one for http://mydomain.com/abc123
This does not happen in FireFox. (And I haven't tried any other browser).
Is this a known behavior of IE (I tested IE9 and IE8)?
Is there a way to overcome it (in a programmatic manner)?
Note: Just to clarify, this does not happen when switching from http://mydomain.com/abc to http://mydomain.com/xyz - the behavior is strictly restricted to flows where currentUrl.startswith(urlAssociatedWithCookie) == true
I checked the behavior using Fiddler - I clearly see the HTTP request for abc123 sent with the value of the cookie belonging to abc.
I also checked the cookies on FireFox and they are as expected - one created per path.