Description of problem: ---Problem Description--- On RHEL4U4 mod_python 3.1.3 is included. When passing large files through a python script these files get corrupted. When building and installing mod_python 3.2.8 from EL5 the problem is fixed and the files are passed through correctly. This URL http://issue s.apache.org/bugzilla/show_bug.cgi?id=41468 is about the same issue but filed wrongly for httpd itself. Contact Information = Tim Verhoeven/tim.verhoeven.com ---uname output--- Linux wegdaap40 2.6.9-42.EL #1 Wed Jul 12 23:15:20 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux Machine Type = VMWare ESX 3.0 guest ---Debugger--- A debugger is not configured Version-Release number of selected component (if applicable): mod_python-3.1.3-5.1 How reproducible: always Steps to Reproduce: 1. Install the following filter under DocumentRoot import time from mod_python import apache def outputfilter(filter): # extract important info request = filter.req connection = request.connection (address,port) = connection.remote_addr # if requesting this file, don't return it if request.the_request.find("watcher.py") != -1: filter.close() return # pass-through filter s = filter.read() while s: filter.write(s) s = filter.read() if s is None: filter.close() 2. Add the following statements to the directory section containing the file in the httpd config to enable python parsing : AddHandler mod_python .py PythonOutputFilter watcher WATCHER AddOutputFilter WATCHER ks.cfg AddOutputFilter WATCHER .rpm AddOutputFilter WATCHER .xml AddOutputFilter WATCHER .py 3. Put a small and large file ending in .rpm of .xml in the same dir and retrieve the file using mozilla, wget, ... additional. The file only needs to be >8192 bytes 4. When using mod_python 3.1.3 the file is corrupted at the end with 3.2.8 not. Actual results: Corrupted file Expected results: clean file. Additional info: backported two lines of fix from the 3.2.8 version included with RHEL5, patch attached.
Created attachment 152700 [details] mod_python-3.1.3-buflen.patch buffer read fixes
*** This bug has been marked as a duplicate of 231065 ***