[Buffalo-pm] mod_perl2, pass control back to apache?

joshj at linuxmail.org joshj at linuxmail.org
Tue Apr 25 14:56:15 PDT 2006

I have a mod_perl app. I have it so that a certain directory can only be
accessed if the user has a valid session. If its not valid it returns an
Apache::Const::FORBIDDEN. Is there any way I can set this up so that
control of the file is somehow given back to Apache once the user's
session is validated? I'll try to clarify a bit:

The user goes to get a listing of the directory. But they are not logged
in. They get the Forbidden page. This works fine.

If the user is logged in then I want them to be able to get that classic
Apache Directory listing. Then they can click on the files and they will
get them.

If I have to take care of this stuff on the Perl side then I have to
manually create the directory listing. Which isn't bad. but serving up
the files is a bit of a problem because I can't figure an easy way to
determing the content_type. Is there a way to get the content_type or
mime-type from the ApacheRequest object?

Another option would be to proxy this to another apache server that only
listens on localhost and just serves up static files. Does any of this
sound doable?

-Josh J

More information about the Buffalo-pm mailing list