Geoffrey Young wrote:
hi all...it's a good idea, though since mod_perl 1.0 is stable nowadays and not many new releases happen, if CPAN modules will start to use the new functionality this will force users to upgrade, which they may find disturbing. Remember that $r->user has been backported long time ago, though I can't see any entries in the Changes file, The log shows:
I'm not too sure about this patch, but doug did port $r->user back to 1.0 in
order to ease the transition to 2.0, so I figured it might make sense to do
the same with $r->ap_auth_type as well.
I think that, in general, we're really not in the job of making mod_perl 1.0
forward compat wrt the various ap_* functions, but with major changes to the connection record and request record, it might be a good idea to port those over so folks can write code that works on both without compat.pm.
anyway, it's just a suggestion - comments welcome :)
revision 1.109
date: 2000/09/27 16:25:56; author: dougm; state: Exp; lines: +10 -0
added Apache::user method in preparation for 2.0, now that `user' hangs
off of the request_rec rather than request_rec->connection in Apache 2.0
PR:
Obtained from:
Submitted by:
Reviewed by:
That's 2.5 years ago.
--Geoff
------------------------------------------------------------------------
Index: src/modules/perl/Apache.xs
===================================================================
RCS file: /home/cvspublic/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.125
diff -u -r1.125 Apache.xs
--- src/modules/perl/Apache.xs 6 Jul 2001 20:33:35 -0000 1.125
+++ src/modules/perl/Apache.xs 19 Feb 2003 14:30:03 -0000
@@ -932,6 +932,16 @@
OUTPUT:
RETVAL
+char *
+ap_auth_type(r, ...)
+ Apache r
+
+ CODE:
+ get_set_PVp(r->connection->auth_type,r->pool);
+
+ OUTPUT:
+ RETVAL
+
void
basic_http_header(r)
Apache r
Index: t/docs/startup.pl
===================================================================
RCS file: /home/cvspublic/modperl/t/docs/startup.pl,v
retrieving revision 1.44
diff -u -r1.44 startup.pl
--- t/docs/startup.pl 23 May 2002 03:07:27 -0000 1.44
+++ t/docs/startup.pl 19 Feb 2003 14:30:03 -0000
@@ -182,6 +182,8 @@
return AUTH_REQUIRED;
}
+ return SERVER_ERROR unless $r->ap_auth_type eq 'Basic';
+
return OK; }
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
