Hi guys,
A quick question about Set-Cookie header behaviour.
I'm running into an issue when running stateless and using InMemoryResponse constructs with custom cookies.
1. I have enabled stateless behaviour
LiftRules.enableContainerSessions = false
LiftRules.statelessReqTest.append { case _ => true }
2. I added my RestHelper to stateslessDispatch in Boot.scala
3. I'm using S.statelessInit(req) {
S.addCookie(HTTPCookie("testCookie","test").setMaxAge(Days.days(90),toPeriod.toStandardSeconds.getSeconds).setPath("/"))
Full(InMemoryResponse(Array(), S.getResponseHeaders(Nil), S.responseCookies, 200))
}
When inspecting the request headers, I see a duplicate Set-Cookie as in:
Set-Cookie JSESSIONID=10e7r7xrbnzv11fpp19h9ia6cv;Path=/
Set-Cookie testCookie=test;Path=/;Expires=Wed, 01-Jan-2014 21:10:25 GMT
which yields that any requests coming from IE always produce S.cookieValue("testCookie") as Empty
Can someone please advise how to merge the JSESSIONID Set-Cookie with custsom cookie headers? I don't set JSESSIONID header anywhere, it must be coming from the embedded Jetty or something.