Nicolas Lehuen
nicolas.lehuen at gmail.com
Tue Jan 18 10:46:57 EST 2005
Use req.sendfile(). See : http://www.modpython.org/pipermail/mod_python/2005-January/017118.html Maybe we should add this to the FAQ (http://www.modpython.org/FAQ/faqw.py) ? Regards, Nicolas On Tue, 18 Jan 2005 16:21:04 +0100, Igor Stroh <igor at rulim.de> wrote: > Hi there, > > I'm looking for a way to serve files from the filesystem > through mod_python. Right now I'm just doing stuff like > request.write(file(<path>).read()) > but this is obviously quite expensive when the files are > big, since they're dumped at once into memory... > The whole thing would be ways faster if there would be > a way to just "pipe" those files through mod_python > directly to apache, i.e. just by pointing to a path > or a file descriptor... Any ideas? > > TIA, > Igor > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|