[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl-cvs
Subject: cvs commit: modperl-2.0/t/hooks/TestHooks authen.pm authz.pm
From: stas () apache ! org
Date: 2003-06-18 8:59:04
[Download RAW message or body]
stas 2003/06/18 01:59:04
Modified: t/hooks/TestHooks authen.pm authz.pm
Log:
use non-deprecated constants: 's|AUTH_REQUIRED|HTTP_UNAUTHORIZED|'
Revision Changes Path
1.6 +2 -2 modperl-2.0/t/hooks/TestHooks/authen.pm
Index: authen.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/authen.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- authen.pm 11 Apr 2002 11:08:43 -0000 1.5
+++ authen.pm 18 Jun 2003 08:59:04 -0000 1.6
@@ -5,7 +5,7 @@
use Apache::Access ();
-use Apache::Const -compile => qw(OK AUTH_REQUIRED SERVER_ERROR);
+use Apache::Const -compile => qw(OK HTTP_UNAUTHORIZED SERVER_ERROR);
sub handler {
my $r = shift;
@@ -22,7 +22,7 @@
unless ($user eq 'dougm' and $sent_pw eq 'foo') {
$r->note_basic_auth_failure;
- return Apache::AUTH_REQUIRED;
+ return Apache::HTTP_UNAUTHORIZED;
}
Apache::OK;
1.4 +4 -4 modperl-2.0/t/hooks/TestHooks/authz.pm
Index: authz.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/authz.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- authz.pm 31 Mar 2003 01:50:52 -0000 1.3
+++ authz.pm 18 Jun 2003 08:59:04 -0000 1.4
@@ -5,7 +5,7 @@
use Apache::Access ();
-use Apache::Const -compile => qw(OK AUTH_REQUIRED);
+use Apache::Const -compile => qw(OK HTTP_UNAUTHORIZED);
sub auth_any {
my $r = shift;
@@ -15,7 +15,7 @@
unless($r->user and $sent_pw) {
$r->note_basic_auth_failure;
- return Apache::AUTH_REQUIRED;
+ return Apache::HTTP_UNAUTHORIZED;
}
return Apache::OK;
@@ -26,11 +26,11 @@
my $user = $r->user;
- return Apache::AUTH_REQUIRED unless $user;
+ return Apache::HTTP_UNAUTHORIZED unless $user;
my($u, @allowed) = split /\s+/, $r->requires->[0]->{requirement};
- return Apache::AUTH_REQUIRED unless grep { $_ eq $user } @allowed;
+ return Apache::HTTP_UNAUTHORIZED unless grep { $_ eq $user } @allowed;
Apache::OK;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic