I printed out the contents of the Cookie attribute in the request header and I can see the cookie present in the header. I read all the contents into a hash and then try to check for its existence. The if(exists($hashMap{'SSOTokenID'})) condition fails. Does it have anything to do with data types? How can I check for its existence?

Here is the code snippet:

     my $cookie = $r->headers_in->{'Cookie'};
     my @cookieArray = split(";",$cookie);

     my %hashMap;
     my $cookieItem;
     foreach $cookieItem (@cookieArray){
               my @subArray = split("=",$cookieItem);
               my $key = $subArray[0];
               my $value = $subArray[1];
               $hashMap{$key}=$value;
     }
    my $k;
    my $v;
     while ( ($k,$v) = each %hashMap ) {
           $log->error("$k => $v");
     }
my $token;
     if (exists($hashMap{'SSOTokenID'})) {
       # it exists
       $log->error("Token found");
       $token=$hashMap{'SSOTokenID'};
    }else {
       $log->error("Token NOT Found");
    }

Thanks
Sumit


Sumit Shah wrote:
The jsp pages are also handled by JSERV. I am not sure if JSERV is kicking in and consuming the headers. Is there a way to check which module is being executed and in what order?

Thanks
Sumit

Michael Peters wrote:
Sumit Shah wrote:
Thanks. Yes, my handler gets invoked when I set it up as
PerlAccessHandler or PerlAuthenHandler but does not fetch any cookies. I
am not sure if it has anything to do with the requests (.jsp files) its
handling.

My guess is that something else is running first and consuming the cookie headers so that later phases don't see them. What else is configured to handle
those .jsp pages?



Reply via email to