Hey,

I believe pretty much any of the HTTP variables are allowed..

http://perl.apache.org/docs/1.0/api/Apache.html#_r_E_gt_header_in___header_name____value___

also check the headers_in (with an S) so get the hash of client
request headers.. Those can be fed to header_in

HTH

On 7/30/06, Fred Tyler <[EMAIL PROTECTED]> wrote:
On 7/30/06, Hendrik Van Belleghem <[EMAIL PROTECTED]> wrote:
> Using the pure mod_perl approach has always worked for me:
>
> my $ref = $req->header_in("Referer");

Oh, wow, that's actually just what I was looking for. Is that
case-sensitive? I'd like to stop using %ENV altogether, but the stuff
in %ENV is scattered in several different places and I don't always
know where to find it ($r->header_in('something'), $r->document_root,
$s->port, etc.)

Is there some kind of mapping somewhere that tells you where to find
the stuff that you'd find in %ENV under CGI? It wasn't in the
CGI->mod_perl porting guide.

Anyway, thanks for the tip.



> 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
>



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

Reply via email to