[MDL side: I'm CCing this for informational purposes. I'll post a reply later with what information I get.]

I just want to make sure I get this right...

I'd like to know how to set cookies from a module for m_p 2.0 WITHOUT using Apache::Request.

It's a quite nice module (I used it for my m_p 1.0 work.) The problem is, the machine I'm doing this on will soon run Apache 2.0.47 (the machine will run Fedora Core 1.0), so I can't use Apache::Request and Apache::Cookie like I have been doing! Due to maintenance constraints, we can't use 2.0.48 (the requirement for the m_p 2.0 versions of Apache::Request) until there is an RPM for it from RedHat. (we're converting 2 other machines to Fedora Core 1.0 in the near future... things need to be easy... ergo, a requirement for RPMs for non-trivial things. Perl modules must either be written by us or be in CPAN.)

I'll attach my 1.0 code below (it's in a PerlAuthenHandler)

...

my $cookie1 = new Apache::Cookie($r,
-name => 'mnw_user', -value => $db_user, -domain => '.mission.net', -path => '/',);


my $cookie2 = new Apache::Cookie($r,
-name => 'mnw_passwd', -value => $db_passwd, -domain => '.mission.net', -path => '/',);


my $cookie3 = new Apache::Cookie($r,
-name => 'mnw_id', -value => $db_id, -domain => '.mission.net', -path => '/',);


my $filename = $r->filename;

    if ($filename =~ m#logout\.html$#) {
      # expire it now!
      $cookie1->expires('-1d');
      $cookie2->expires('-1d');
      $cookie3->expires('-1d');
    }

    $cookie1->bake;
    $cookie2->bake;
    $cookie3->bake;


-- LDS Mission Network(sm) The mission home of the World Wide Web.(sm) www.mission.net / www.ldsmissions.net Curtis Jewell, [EMAIL PROTECTED], [EMAIL PROTECTED] (soon)


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to