[mod_python] problem with input filter and POST data (fileupload)

Joerg jerch at rockborn.de
Sun Feb 15 18:40:16 EST 2009

> Augment your input filter script with debug statements so you can
> trace exactly what it is doing, ie., data read, accumulated length of
> data etc etc.

as i said before, its not working even with the simplest filter. so thats my 
filter atm:

from mod_python import apache

def inputfilter(filter):
	s = filter.read()
	while s:
		s = filter.read()
	if s is None:

nothing to trace here.

> I still don't believe modifying util.py is the answer, it is more
> likely to be something in your input filter not passing everything
> back or truncating it.

the util.py thing is just my observation, the req.readline() vs. 
req.readline(readBlockSize) has the same effect with the simple filter above.

also my own filter seems to work with req.readline(), since i can get all the 
data. plz correct me, if im wrong, but if the filter would drop some data, 
this should not be possible (in the request handler stage).

i did some data dumps in the filter and in the util.py and compared them (see 
the results in the earlier message). ill do a direct dump in the request 
handler via req.read() readline() and readline(size), maybe i can reproduce 
this behavior.


More information about the Mod_python mailing list