Accessing environment variables prior to invoking thecontenthandler.

2003-07-31 Thread Mark Deepak Puttnam
Only PERL_SEND_HEADER=On. No other env. variables.

I did run tests by clicking on links to check to see if the HTTP_REFERER
is being set. 

Mark.



Accessing environment variables prior to invoking the contenthandler.

2003-07-31 Thread Mark Deepak Puttnam
Hi Group,

I have a need to access all the %ENV (cgi,mod_perl sent by the client)
variables prior to invoking the content handler. I am using the modperl
environment by running the cgi scripts under Perl::Registry. I wish to
use the PerlTransHandler to check if the request for page A has
orginated from page B. If it did then redirect to page C.

I have used the following code in the in my handler and I still do not
get the values. This was recommended by the "Writing Apache Modules by
Doug M and Lincoln S." 

sub handler {
my $r=shift;
my $env=$r->subprocess_env;
   %ENV=%$senv;

my $referer=$ENV{'HTTP_REFERER'}; 
  
   
   x


}


Thank you for the help in advance.


Mark