[EMAIL PROTECTED] (Thomas Bach) wrote:
>perhaps it is off-topic (sorry for that, but i hope that somebody of you 
>can help me), but somehow i wish to have a solution with precompiled perl 
>such as mod_perl or ... everything else which fits to my needs.
>
>I want to filter every access of for example all .jpg-files on my apache 
>for autentication purposes. I  use my own cookie-based authentication 
>mechanisms.
>So one solution i had was to add a handler
>
>Action auth authent.pl
>AddHanlder auth jpg
>
>and in the authent.pl use something like a internal redirection. But the 
>only way i know to get this internal redirection is the following:
>
>open(DATEI, ...)
>print while (<DATEI>)
>close(DATEI)

If you want to directly send a file, use:

   open(DATEI, ...)
   $r->send_fd(DATEI)
   close(DATEI)

You can do an internal redirect using subrequests, if you want.  See
$r->lookup_uri().

But I'm not sure why you need to redirect just to authenticate.  Can't
you just deny access if authentication fails, and allow it if it
succeeds?


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum

Reply via email to