Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-233

Race condition in req.sendfile().

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.1
    • None
    • core
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            grahamd Graham Phillip Dumpleton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: