perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Gormley < >
Subject Re: which module for this purpose?
Date Thu, 14 Jun 2007 10:15:58 GMT

On Thu, 2007-06-14 at 18:04 +0800, Foo JH wrote:
> Clinton's approach may be better (with PerlAccessHandler). Try that 
> approach first...
> Basically to return a file content over there's not much work to be done:

...although, from the problem set that has been described, there is no
reason to replace what Apache already does.

> 1. Set the content mime type to octet/ application
> 2. open a file for reading as you normally would - via the open() and 
> close() functions
> 3. convert to base64 and send it over

Why are you converting to base64?

All you need to do (assuming mod_perl2) is:
 - set the content-type (to whatever file type you are sending)
 - use $r->sendfile('filename')



View raw message