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') See http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_sendfile_ Clint