Bug 236578 - filter output is corrupted
filter output is corrupted
Status: CLOSED DUPLICATE of bug 231065
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mod_python (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2007-04-16 11:27 EDT by Martin Poole
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-16 11:43:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
mod_python-3.1.3-buflen.patch buffer read fixes (964 bytes, patch)
2007-04-16 11:27 EDT, Martin Poole
no flags Details | Diff

  None (edit)
Description Martin Poole 2007-04-16 11:27:28 EDT
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@be.ibm.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

Machine Type = VMWare ESX 3.0 guest

A debugger is not configured

Version-Release number of selected component (if applicable):


How reproducible:


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:

   # pass-through filter
   s = filter.read()
   while s:
       s = filter.read()
   if s is None:

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
Comment 1 Martin Poole 2007-04-16 11:27:35 EDT
Created attachment 152700 [details]
mod_python-3.1.3-buflen.patch buffer read fixes
Comment 2 Joe Orton 2007-04-16 11:43:57 EDT

*** This bug has been marked as a duplicate of 231065 ***

Note You need to log in before you can comment on or make changes to this bug.