Race condition in req.sendfile().

                 Key: MODPYTHON-233
                 URL: https://issues.apache.org/jira/browse/MODPYTHON-233
             Project: mod_python
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.1
            Reporter: Graham Dumpleton
            Priority: Minor

In code for req.sendfile() if no length is supplied indicating how much data 
should be sent then a stat() is performed on the file to determine the amount 
of data in the file. The file is then opened and that much data sent.

Technically this would be a problem if the file changed in between the stat() 
and sending the data. The result could be that not all data in the file is sent.

To possibly avoid this problem, but also may improve efficiency of sending 
files, it would probably be better if an APR file bucket be created and added 
to the output bucket chain rather than mod_python itself reading data from the 
file and write it back in the response.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to