[mod_python] [Patch] req.write_file for 2.7.x

Conrad Steenberg conrad at hep.caltech.edu
Tue May 20 15:39:40 EST 2003


On Tue, 2003-05-20 at 08:02, Ben Allums wrote:
> On 5/19/03 at 2:08 PM, conrad at hep.caltech.edu (Conrad Steenberg) wrote:
> 
> > Here is a patch to mod_python version 2.7.x that adds the method
> > write_file to the request object.
> > 
> > This method writes the named file to the client using the Apache
> > ap_send_fd_length() call. It works for both normal (http) and SSL/TLS
> > (https) connections, with the former using the sendfile() system call
> > where available. This significantly improves performance and reduces
> > CPU usage relative to reading data into a buffer and writing it to
> > the client using the req.write() method.
> 
> Thank you Conrad.  I current use a series of "req.write()" calls to do
> this exact operation.

:-)

Maybe we can convince Grisha to apply the patches in the next release?

Conrad

> 
> 
> Ben
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
-- 
Conrad Steenberg <conrad at hep.caltech.edu>



More information about the Mod_python mailing list