dougm       00/09/27 16:51:35

  Modified:    .        Changes ToDo
               src/modules/perl Apache.xs mod_perl.h perl_config.c
  Log:
  $r->get_basic_auth_pw will default $r->auth_type to "Basic" if not
  already set
  
  $r->auth_type is now writeable, e.g. $r->auth_type("Basic")
  
  Revision  Changes    Path
  1.530     +5 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.529
  retrieving revision 1.530
  diff -u -r1.529 -r1.530
  --- Changes   2000/09/27 19:44:20     1.529
  +++ Changes   2000/09/27 23:51:28     1.530
  @@ -10,6 +10,11 @@
   
   =item 1.24_01-dev
   
  +$r->get_basic_auth_pw will default $r->auth_type to "Basic" if not
  +already set
  +
  +$r->auth_type is now writeable, e.g. $r->auth_type("Basic")
  +
   fix $r->read() so it will not block if all data has already been read
   and so that Apache will not hang during ap_discard_request_body() on
   error or redirect after all data has been read
  
  
  
  1.258     +0 -3      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /home/cvs/modperl/ToDo,v
  retrieving revision 1.257
  retrieving revision 1.258
  diff -u -r1.257 -r1.258
  --- ToDo      2000/09/27 21:26:24     1.257
  +++ ToDo      2000/09/27 23:51:29     1.258
  @@ -138,9 +138,6 @@
   - recursion triggered by internal_redirect() called by a pushed handler
   [Ashish Goyal <[EMAIL PROTECTED]>]
   
  -- auth stuff segfaults if AuthType isn't set
  -[Matt Sergeant <[EMAIL PROTECTED]>]
  -
   - Gerald's report of Embperl/sub-request/print breakage
   
   - /perl/perl-status?sig dumps core under hpux 10.20
  
  
  
  1.111     +5 -1      modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- Apache.xs 2000/09/27 19:44:23     1.110
  +++ Apache.xs 2000/09/27 23:51:33     1.111
  @@ -824,8 +824,9 @@
       char *val
   
   const char *
  -auth_type(r)
  +mod_perl_auth_type(r, val=NULL)
       Apache    r
  +    char *val
   
   const char *
   document_root(r, ...)
  @@ -887,6 +888,9 @@
       int ret;
   
       PPCODE:
  +    if (!auth_type(r)) {
  +        (void)mod_perl_auth_type(r, "Basic");
  +    }
       ret = get_basic_auth_pw(r, &sent_pw);
       XPUSHs(sv_2mortal((SV*)newSViv(ret)));
       if(ret == OK)
  
  
  
  1.104     +1 -0      modperl/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- mod_perl.h        2000/09/22 18:51:59     1.103
  +++ mod_perl.h        2000/09/27 23:51:34     1.104
  @@ -1185,6 +1185,7 @@
       perl_require_module("Apache", s)
   
   char *mod_perl_auth_name(request_rec *r, char *val);
  +char *mod_perl_auth_type(request_rec *r, char *val);
   
   module *perl_get_module_ptr(char *name, int len);
   void *perl_merge_server_config(pool *p, void *basev, void *addv);
  
  
  
  1.106     +18 -0     modperl/src/modules/perl/perl_config.c
  
  Index: perl_config.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- perl_config.c     2000/09/27 15:37:33     1.105
  +++ perl_config.c     2000/09/27 23:51:34     1.106
  @@ -158,6 +158,24 @@
   #endif
   }
   
  +char *mod_perl_auth_type(request_rec *r, char *val)
  +{
  +#ifndef WIN32 
  +    core_dir_config *conf = 
  +      (core_dir_config *)get_module_config(r->per_dir_config, &core_module); 
  +
  +    if(val) {
  +     conf->auth_type = pstrdup(r->pool, val);
  +     set_module_config(r->per_dir_config, &core_module, (void*)conf); 
  +     MP_TRACE_g(fprintf(stderr, "mod_perl: setting auth_type to %s\n", 
conf->auth_name));
  +    }
  +
  +    return conf->auth_type;
  +#else
  +    return (char *) auth_type(r);
  +#endif
  +}
  +
   void mod_perl_dir_env(request_rec *r, perl_dir_config *cld)
   {
       if(MP_HASENV(cld)) {
  
  
  

Reply via email to