>         OLD WAY: [broken]
>         $obj->{USER_ID} = $r->user;
>         $obj->{USER_PASS} = $I->get_basic_auth_pw;

I'm not sure where you would have gotten this way from, but it is clearly
wrong - in both apache 1.3 and 2.0 it is ap_get_basic_auth_pw that populates
$r->user (r->user in 2.0 and r->connection->user in 1.3).

>         NEW WAY: [fixed]
>         $obj->{USER_PASS} = $r->get_basic_auth_pw;
>         $obj->{USER_ID} = $r->user;

yes, this has always been the correct way.

subrequests (of which internal_redirect is one) have a rather clever bug in
1.3 - r->connection->user is global to the entire request, which includes
any subrequests.  so, the "OLD WAY" would have worked for subrequests in 1.3
(though it should not have worked for the main request).  see a post from me
last week for more details on this exact issue.

at any rate, this is not a mod_perl bug, or even a mod_perl feature - it's a
feature of the apache API and there is nothing mod_perl can do about it.

but thanks for bringing it up :)

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to