perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Smith <>
Subject Cookies in PerlAccessHandlers
Date Sun, 22 Apr 2001 14:54:05 GMT
In a PerlAccessHandler I have code similar to the following:

sub handler
    my $r = shift;
    my ($cgi, $cookie);

    use CGI;
    $cgi = new CGI;
    $cookie = $cgi->cookie(-name => 'test');

    # For debugging only
    open(TEST, ">>/tmp/accesstest");
    print TEST "cookie = $cookie";

    # This if block is not included in the PerlHandler version
    if ($cookie eq '')
        return FORBIDDEN;

However, nothing is written to the log file and the forbidden screen is
displayed. The exact same code works fine if its in a regular mod_perl module
installed using PerlHandler. Why is the code working inside a PerlHandler
module and not in PerlAccessHandler?

The system in question is running Apache 1.3.19+mod_perl 1.25+Perl
5.005_03 (RedHat 6.2).


View raw message