users@glassfish.java.net

Re: Cookies, load balancers, and Internet Explorer

From: Scott Oaks <Scott.Oaks_at_Sun.COM>
Date: Wed, 30 Apr 2008 13:56:12 -0400

Just in case anyone googles "cookies not returned by internet explorer"
and wonders what's up with this, it turns out that IE will reject
cookies from any host that contains an underscore in it. Apparently even
by design...

So really, nothing at all to do with glassfish (which is doubtless why I
was sent to troubleshoot it...)

-Scott

Scott Oaks wrote:
> I have a HW loadbalancer sitting in front of my glassfish cluster.
> When I visit the loadbalancer (http://lb.my.local.domain.com), it
> forwards the request to one of the instances
> (http://inst1.my.local.domain.com), which sends back the response
> including a JSESSIONID cookie. Then the next request goes to the
> loadbalancer, which presumably will use the cookie to send the request
> to the appropriate instance.
>
> Which all works flawlessly with Firefox and Opera. IE, however,
> decides not to send the cookie back.
>
> I've tried setting the cookieDomain property in sun-web.xml to
> .domain.com and to .my.local.domain.com. The cookie makes it to IE
> correctly (i.e., visiting /MyAppContext/set.jsp returns a cookie
> formed like this:
> Set-Cookie: JSESSIONID=idstring; Comment=Sun One Application Server
> Sesson Tracking Cookie; Domain=.my.local.domain.com;
> Path=/MyAppContext). Yet still, when I visit /MyAppContext/get.jsp, IE
> doesn't send back the cookie. If I visit the an appserver instance
> directly, then everything works for IE as well as the other browsers
> -- but I've snooped the network around the loadbalancer; it's not
> re-writing the JSESSIONID cookie (the above cookie is what the network
> trace on the browser machine looks like).
>
> What completely stupid thing have I missed to get this to work with IE?
>
> -Scott
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>