File: echo_cookie.pl

package info (click to toggle)
libapache-authcookie-perl 3.10-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 232 kB
  • ctags: 49
  • sloc: perl: 841; makefile: 41; sh: 29
file content (20 lines) | stat: -rwxr-xr-x 389 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;

use mod_perl;
use constant MODPERL2 => ($mod_perl::VERSION >= 1.99);

if (MODPERL2) {
    require Apache2::Access;
}

my $r = MODPERL2 ? Apache2::RequestUtil->request
                 : Apache->request;

my $auth_type = $r->auth_type;

# Delete the cookie, etc.
$r->content_type("text/html");
$r->status(200);
$r->send_http_header unless MODPERL2;

print $auth_type->key($r);