perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <>
Subject Re: A question about wiring up filehandles for direct dump to HTTP pipe
Date Fri, 22 Feb 2008 14:35:52 GMT
Victor Danilchenko wrote:

>     Is there any way, to, uhhh, tell Apache programatically to simply
> slurp up the file from an open filehandle

I could be wrong, but I doubt you can pass a Perl file handle to a C program
that is not Perl aware (like Apache).

> or to grab a given file from
> disk? Doing a redirect to the real location is less than ideal precisely
> because that will  open a door to the circumvention of this accounting
> script, a door which will be rather hard to close.

What about an internal redirect? It won't expose where the door is and you can
make it such that access to that URL is forbidden to any request not coming from
your machine.

But the best approach seems to convert your code into an Apache Authen or Authz
handler to do all the book keeping. Then simply let Apache continue with the
processing after that. You'd probably have to ditch Mason for that piece of the
code, but it's pretty straight forward.

Michael Peters
Plus Three, LP

View raw message