Hello gurus in mod_perl land!
mod_perl is a great extension to apache!
I just wish it were easier to config & install.
Touching an Apache/mod_perl installation that already works is just
about the only thing that scares me these days.

As for my problem...

Hardware: Dual processor PIII 500Mhz, 512Meg
Software: modperl/1.21, Apache/1.3.6, RedHat/6.1
mod_perl build flags: ?? (I don't know how to determine what they were)

I've got a site that uses a cookie to determine the user's identity and
session. I noticed that after bouncing quickly around the site has
started driving me to the login page for the site. This shouldn't happen
because the session I've got is "fresh" (it should become invalid only
after a month). I tracked the sporadic problem down to the HTTP_COOKIE
value being corrupted from time to time. All the other environment
variables are exactly the same as they should be between page loads, but
the HTTP_COOKIE value sometimes ends up with random junk in the 4
characters starting at position 22 (where 1 is the first character in
the string). It's always those 4 that get corrupted! I've seen them be
printable text, and binary characters.

Actually the PATH variable is somewhat corrupted as well. It's correct
on the first hit to an agent, but ALWAYS bad after that. I noticed some
posts about this problem.

The HTTP_COOKIE problem is difficult to produce, but does repeat more
often after the first occurance. Changing the url in my browser to load
a different CGI seems to affect how often the problem arrives, so it's
been difficult to document. I tried hitting a really small sample
program, but I can't catch the problem there when the problem is
happening somewhere else.

My code does not change the values within %ENV. To see the details of
the problem I dumped the contents of %ENV to a file and started jumping
between two web pages with reasonable speed (extreme speed not
required). After it starts, even waiting for a while does not make the
problem go away.

Here's how I dumped the values for seeing that the HTTP_COOKIE value was
not right:
my ($k, $v);
open (SAV, ">>/tmp/sav.out");
while (($k, $v) = each %ENV) {
print SAV "$k = $v\n";
}
close(SAV);

Here's the HTTP_COOKIE entries on subsequent page hits (no changes
should have occurred):

This is correct:
HTTP_COOKIE =
i=i%3DT%26s%3DaaQBS8Wuasaaul%252F12i3u%26devunlock%3D1234%26e%3Daaronn%2540questra.com

These are incorrect (notice the 4 chars starting at position 22 are
different):
HTTP_COOKIE =
i=i%3DT%26s%3DaaQBS8Woutiaul%252F12i3u%26devunlock%3D1234%26e%3Daaronn%2540questra.com

HTTP_COOKIE =
i=i%3DT%26s%3DaaQBS8Wä~I¦Íaul%252F12i3u%26devunlock%3D6069%26e%3Daaronn%2540questra.com

HTTP_COOKIE =
i=i%3DT%26s%3DaaQBS8W><FOaul%252F12i3u%26devunlock%3D6069%26e%3Daaronn%2540questra.com

I'm hoping that this will sound & look familiar to you, and tell me that
it was all fixed in a recent (stable) release.
Please let me know,
-AAron

Reply via email to