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

Ben. B. bennymack at gmail.com
Tue Apr 25 15:04:41 PDT 2006


I'm not 100% sure but I think what you're looking for is the DECLINED
constant. What you would do is have your request object return
DECLINED then apache would take over again. I learned this trick while
using mod_perl in conjunction with HTML::Mason

http://www.masonhq.com/?HandlingDirectoriesWithDhandlers

On 4/25/06, joshj at linuxmail.org <joshj at linuxmail.org> wrote:
> 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
> _______________________________________________
> Buffalo-pm mailing list
> Buffalo-pm at pm.org
> http://mail.pm.org/mailman/listinfo/buffalo-pm
>


More information about the Buffalo-pm mailing list