After the last week of being baffled as to why session entries keep dropping, I suddenly discover the code in CGI.pm to be at fault.
Running under mod_perl, the cookies are cached by CGI.pm. If those values change they are ignored in preference to the cached versions. I now call CGI::Cookie->fetch directly. A shame the CGI pod page doesn't mention it though. Might have saved me a weeks worth of tweeking.
Re:that smells like a bug
barbie on 2002-10-11T18:13:07
I don't think it's a bug, more the way that CGI->cookie() works. I'm using the NMS version of cookielib, which uses it, although I've changed it to use the CGI::Cookie->fetch mechanism for our purposes.If there are special mod_perl prerequisites then they aren't specified under the "HTTP COOKIES" section of the POD, which is where I would have expected them. I checked for mod_perl references in the POD, of which there are two, and neither mention anything about the handling of cookies
:( I've notice a few people have had similar problems, but virtually all the references in archives are around 5 years old. There's nothing that I could find in the docs on the perl.apache.org site either.
It works for now, and after we've got the load testing and deployment to 6 clients over the next two weeks, I'll investigate further. Might end up being added to an FAQ somewhere.
It's been a nice learning experience though
:)