~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to ModPerl-Registry/t/cgi-bin/redirect-cookie.pl

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2005-08-12 01:40:38 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050812014038-gjigefs55pqx4qc8
Tags: 2.0.1-3
Grr.  Really include perl.conf file; it got lost due to diff not
wanting to add an empty file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# test env vars
2
2
 
3
 
use Apache::URI ();
4
 
use Apache::Const -compile => qw(REDIRECT SERVER_ERROR);
 
3
use Apache2::URI ();
 
4
use Apache2::Const -compile => qw(REDIRECT SERVER_ERROR);
5
5
 
6
6
my $r = shift;
7
7
my $path = $r->args || '';
9
9
 
10
10
$r->err_headers_out->set('Set-Cookie' => "mod_perl=ubercool; path=/");
11
11
$r->headers_out->set(Location => " http://$server$path");
12
 
$r->status(Apache::REDIRECT);
 
12
$r->status(Apache2::Const::REDIRECT);
13
13
 
14
14
# exit status is completely ignored in Registry
15
15
# due to $r->status hacking
16
 
return Apache::SERVER_ERROR;
 
16
return Apache2::Const::SERVER_ERROR;
17
17
 
18
18
__END__