hi all...

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 :)

--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]

Reply via email to