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

Ben Allums ballums at swbell.net
Tue May 20 10:02:26 EST 2003


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.


Ben


More information about the Mod_python mailing list