Hi, This is working !!! Good point... But how to handle the authentication as I wanted (no http authentication but my own authentication module ...)
Sylvain -----Original Message----- From: Geoffrey Young [mailto:[EMAIL PROTECTED] Sent: mercredi, 10. janvier 2007 01:47 To: Sylvain Perrot Cc: Modperl Mailing List Subject: Re: [mp2] Perl Auth Handlers and mod_proxy : losing querystring on remote server (BUG?) > <LocationMatch /(?i)protected/> > AuthType Basic > AuthName "Test Authentication" > AuthUserFile /www/xperience.ch/conf/.htpasswd > require valid-user > </LocationMatch> next test - keep all that the same but substitute PerlAuthenHandler My::Authen for AuthUserFile /www/xperience.ch/conf/.htpasswd and use this handler: package My::Authen; use Apache2::RequestRec (); use Apache2::Access (); use Apache2::Const -compile => qw(OK AUTH_REQUIRED); use strict; sub handler { my $r = shift; my ($status, $password) = $r->get_basic_auth_pw; return $status unless $status == Apache2::Const::OK; if ($r->user eq 'foo' && $password eq 'bar') { return Apache2::Const::OK; } $r->note_basic_auth_failure; return Apache2::Const::AUTH_REQUIRED; } 1; just using Apache2::Const::OK in your httpd.conf bypasses some httpd-core API calls that authen might be expecting. this setup exercises everything pretty much the way the default file authen handler does. --Geoff