Mailing List Archive

using %udat from access handler
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
RE: using %udat from access handler [ In reply to ]
Hi,

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

The patch seems to do the right thing. I put it in my develoment version, so
it will be part of the next release

Thanks for the patch

Gerald

-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------