Documentation for these functions reads as follows:

$r->get_basic_auth_pw
If the current request is protected by Basic authentication, this
method will return 0, otherwise -1. [snip]

$r->note_basic_auth_failure
Prior to requiring Basic authentication from the client, this method
will set the outgoing HTTP headers asking the client to authenticate
for the realm defined by the configuration directive `AuthName'.

Experiments have shown that in an AuthenHandler, get_basic_auth_pw
will return AUTH_REQUIRED if the request is protected and the client
did not send credentials. Furthermore, note_basic_auth_failure seems
to have no effect on the realm name.

### httpd.conf snippet; names changed to protect the innocent ###
PerlRequire "/home/www/perl/mod_perl_startup.pl"
PerlFreshRestart On
<Directory "/home/www/htdocs/secret">
  SetHandler perl-script
  # This module is use lib'd and use'd by the startup script
  PerlAuthenHandler Secret::Authen
  PerlHandler Apache::Registry
  PerlSendHeader Off
  AuthType Basic
  AuthName "Secret Subtree"
  Require valid-user
</Directory>
### /httpd.conf ###

I was editing the module (Secret::Authen) and restarting both Mozilla
and the server between trials. PerlFreshRestart was reloading the
module as advertised; this was verified by a `warn' statement that
told whether note_basic_auth_failure was executed or skipped. In both
cases, Mozilla brought up a password dialog for the realm "Secret
Subtree". Also in both cases, multiple Reloads of the page did not
require re-entering the password. So what does
note_basic_auth_failure *really* do?

Finally, I want to fix the get_basic_auth_pw documentation. Where
should patches go for that, and in what format?

System information:
>From vendor (RedHat 7.0) RPM: Perl/5.6.0
>From source: mod_perl/1.26, apache/1.3.20, linux/2.4.16
>From binary: mozilla/0.9.5 (x86 Linux full installer)


=====
C. A. "Sapphire Cat" Daelhousen
You can love me or hate me, but it won't change who I am.
My opinions are my own, until UB purchases my soul.

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

Reply via email to