Is it possible?
Hi all,
Here is my situation. I would like a mod-perl script (a Mason script
actually, but from the mod_perl API POV it's the same thing) to act as a
gatekeeper for file access -- regulate access by application-specific
ACLs, do the accounting on download stats, etc; but then, once the
housekeeping is done, I would like it to take the file (quite likely a
very large video file) and dump it directly to the HTTP pipe.
The obvious solution -- a sysread/syswrite loop -- will probably be
quite a bit slower than simply having Apache read the filehandle
directly. Given that I expect these files to be large and many, I would
really prefer to avoid the sysread/syswrite loop solution.
Is there any way, to, uhhh, tell Apache programatically to simply slurp
up the file from an open filehandle, 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.
Any ideas or alternative solutions are welcome.
Thanks in advance.
--
Victor Danilchenko
Senior Software Engineer, AskOnline.net
[EMAIL PROTECTED] - 617-273-0119