Sergij Borodych wrote: > On 06/14/07 16:14, Sergij Borodych wrote: >> Hi ALL, >> >> I need some help >> >> I set auth_type (like $r->auth_type('MyType')) in PerlAuthenHandler >> if request go in "/" (root) it generate subrequest >> for lookup index.html file name >> after this in subrequest I lost auth_type (but I ignore subrequests) >> but even in PerlLogHandler I can't determine it >> >> this is bug or not ? >> becouse in documentation: >>> auth_type >>> Get/set the type of authorization required for _this request_ >> I may try workaround with use "pnotes", but I want desirably less as >> possibly a superfluous code >> > > As I undestand second(subrequest) call of PerlAuthenHandler > destroy(remove) my auth_type set(even for main request), so > I fix it > > set > $r->auth_type('MyType'); > > before > return OK unless $r->is_initial_req(); > > so even in subrequest I set auth_type > > But I have suspicion - is the bug ? > (I about PerlLogHandler without defined auth_type) > How do you think ? >
if you're using 2.0 then you're probably getting confused at the difference between $r->auth_type() and $r->ap_auth_type(). $r->auth_type() is the value of the AuthType configuration directive. it comes from Apache2::Access. $r->ap_auth_type() is the type of authentication that is actually performed by the server (you or httpd). it comes from Apache2::RequestRec. see http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_ap_auth_type_ but, in short, if you're rolling your own authentication mechanism (which you are) you want to use ap_auth_type() and not auth_type(). HTH --Geoff