jeff_mccombs_47
Jun 10, 2009Nimbostratus
HTTP::cookie exists v.s. [string length[HTTP::cookie NAME]] ?
So I'm playing around with universal persistence, as we have a new project getting ready to roll out that is pretty heavy with ajax/dwr. I was thinking on using the universal persistence mode against JSESSIONID.
And lo, the wonder community has provided me with a template (see: http://devcentral.f5.com/wiki/default.aspx/iRules/Weblogic_JSessionID_Persistence.html), and it should get me going at least, right?
But I'm curious.. I noticed in my testing that [HTTP::cookie exists JSESSIONID] and [string length[HTTP::cookie JSESSIONID]] don't jive with eachother.
Here's what I mean:
set ex [HTTP::cookie exists JSESSIONID]
set le [string length[HTTP::cookie JSESSIONID]]
Now when I test this little snippet of code, I find the following:
1. IF a JSESSIONID cookie was set: ex==1 && le==1
2. IF _NO_ JSESSIONID cookie was set: ex==0 && le==1
WTF? Now how does that work? Shouldn't le==0, because JSESIONID does not exist?