Broc Seib wrote:
> Hi all,
> 
> I have a mix of Apache::ASP code and mod_perl code. Specifically, I use
> Apache::ASP to do the bulk of my site's dynamic pages, plus I have written
> some mod_perl handlers where I've needed to alter server behavior. One of
> these mod_perl handlers does authorization, which is germane to this note
> on managing cookies.
> 
> I needed to access the cookies created by Apache::ASP code from inside
> my mod_perl handler. I typically use the CGI::Cookie module in mod_perl
> to manage cookies. Alas, the way CGI::Cookie does its parse of the cookie
> is not compatible with how Apache::ASP stored the cookie payload; the
> parsing gets hung up on the '=' character in the payload.
> 

I apologize for this difference, but the way IIS/ASP serialized cookies
was different than the way CGI, & I ported the ASP method over at first cut.

It may seem like overkill, but you might try to access the cookies via
a $Request object at runtime like this:

   my $ASP = Apache::ASP->new($r);
   my $Cookies = $ASP->Request->Cookies;

Just make sure to set $r->dir_config('NoState', 1) before doing this
so you do not init $Session & $Application objects during this invocation.

This method of out of Apache::ASP handler invocation is guaranteed to
work in future releases because I test for it at t/asp_object.t
I should really document this method better in the online docs.

There is overhead to creating ASP objects, but this is probably on
the order of 500-1000 per second & also gives you access to the
rest of the objects created.

Regards,

Josh
________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


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

Reply via email to