dougm       00/09/28 10:46:59

  Modified:    .        Changes
               src/modules/perl Apache.xs
  Log:
  default AuthType to Basic for note_basic_auth_failure
  
  Revision  Changes    Path
  1.535     +2 -2      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.534
  retrieving revision 1.535
  diff -u -r1.534 -r1.535
  --- Changes   2000/09/28 16:35:50     1.534
  +++ Changes   2000/09/28 17:46:58     1.535
  @@ -22,8 +22,8 @@
   fix %Apache::ReadConfig:: processing for PerlRequire'd files
   [Salvador Ortiz Garcia <[EMAIL PROTECTED]>]
   
  -$r->get_basic_auth_pw will default $r->auth_type to "Basic" if not
  -already set
  +$r->get_basic_auth_pw and $r->note_basic_auth_failure will default
  +$r->auth_type to "Basic" if not already set
   
   $r->auth_type is now writeable, e.g. $r->auth_type("Basic")
   
  
  
  
  1.113     +10 -3     modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.112
  retrieving revision 1.113
  diff -u -r1.112 -r1.113
  --- Apache.xs 2000/09/28 16:19:56     1.112
  +++ Apache.xs 2000/09/28 17:46:59     1.113
  @@ -359,6 +359,11 @@
                 r->connection->client->flags & B_EOUT);
   }
   
  +#define check_auth_type(r) \
  +    if (!auth_type(r)) { \
  +        (void)mod_perl_auth_type(r, "Basic"); \
  +    }
  +
   MODULE = Apache  PACKAGE = Apache   PREFIX = mod_perl_
   
   PROTOTYPES: DISABLE
  @@ -879,6 +884,10 @@
   note_basic_auth_failure(r)
       Apache r
   
  +    CODE:
  +    check_auth_type(r);
  +    note_basic_auth_failure(r);
  +
   void
   get_basic_auth_pw(r)
       Apache r
  @@ -888,9 +897,7 @@
       int ret;
   
       PPCODE:
  -    if (!auth_type(r)) {
  -        (void)mod_perl_auth_type(r, "Basic");
  -    }
  +    check_auth_type(r);
       ret = get_basic_auth_pw(r, &sent_pw);
       XPUSHs(sv_2mortal((SV*)newSViv(ret)));
       if(ret == OK)
  
  
  

Reply via email to