Using the pure mod_perl approach has always worked for me:

my $ref = $req->header_in("Referer");

IIRC, there was a recommded approach to reading %ENV.. A grep didn't
turn up anything usefull, so far. If this thread is still open, I'll
drop a line :)

HTH

Hendrik

On 7/29/06, Fred Tyler <[EMAIL PROTECTED]> wrote:
Hi, I just noticed something and I don't know if it is normal: Is %ENV
supposed shared between requests???

I was trying to use $ENV{'HTTP_REFERER'} in a certain script, and as I
reloaded the script over and over I noticed that it would constantly
be changing when the page was loaded directly (and therefore there
should not have been any HTTP_REFERER at all).

When I investigated this further, I noticed that there were tons of
%ENV values set that had nothing to do with my current request, and I
concluded that %ENV must be shared between all of the requests that
had been executed in the given child.

Is this correct??? Is %ENV really not cleaned on each new request, or
have I got something really wacky going on.

If ENV is not cleared, then this is a problem... How do people get
around this? I know about the Apache API, but I don't see any method
to get, say, the HTTP_REFERER, or other random environment variables
that may be set.



--
Hendrik Van Belleghem
Spine - The backbone for your website - http://spine.sf.net

Reply via email to