One fairly straight-forward approach would be to write a script that
serves as the path for downloads, then have it parse the filename to
use as a key in determining which content to send to the user. (The
AcceptPathInfo directive could be helpful for this, especially if you
want to the script to appear as a subdirectory to the user.)
That script could perform all the necessary security checks that you
need, and read portions of the file to be streamed as needed (the
streaming protocol implementation details would also need to be
handled by your script, and you might find it helpful to look at
what's available in CPAN for the streaming protocol you want to use).
> In Java servlets, I can stream a file back to the browser one chunk at a
> time. This has 2 benefits which interest me.
> 1) Files can be stored outside the web root so users cannot download them
> unless they are logged in, even if they know the path.
> 2) Large files can be streamed back to the client without having the entire
> file loaded into memory at the same time
>
> How would you recommend achieving similar functionality in mod_perl?
>
> --
> John Dunlap
> *CTO | Lariat *
>
> *Direct:*
> *[email protected] <[email protected]>*
>
> *Customer Service:*
> 877.268.6667
> [email protected]
>
Randolf Richardson - [email protected]
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada
https://www.inter-corporate.com/