I use Embperl 1.2.1, and had no problems until I tried it from an Apache
access handler. The code was something like this:

#-------------------
use HTML::Embperl;

sub handler {
  my $r = shift;
  my @params;
  HTML::Embperl::Execute({inputfile => 'GetUdat.epl', param => \@params,
req_rec => $r});
  my %udat = @params;
  ...

#--------------------

Despite the fact that the EMBPERL_UID cookie was totally accessable from
GetUdat.epl, and contained the right value, embperl didn't find it, and
generated a new _session_id each time. I spent quite a while digging through
Embperl.pm, and eventually came up with this fix:

#Embperl.pl line 893, in Execute()------------------
           elsif($req_rec && $req_rec->header_in('Cookie') &&
($req_rec->header_in('Cookie') =~ /$cookie_name=(.*?)(\;|\s|$)/))
               {
               $sessid = $1 ;
               print LOG "[$$]SES:  Received session cookie $1\n" if
($dbgSession) ;
               $r -> SessionMgnt (0) ; # do not resend cookie
               }
#-----------------------------------------------------

This snippet loads the cookie data from the request record if it doesn't
already exist in the environment variables.

I have not been keeping up with the 1.3x versions (though that line number
is from 1.3b4). Is this fix still necessary? Is there a more effective way
to do it?

Thanks,
Jack Cushman


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to