Re: problem with input filter and POST data (fileupload)

Joerg <[email protected]>
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
hello,

ive dumped a fileupload (original size = 231KB) with the following results:

without filter:
	- req.read() --> 231KB
	- req.readline() --> 231KB
	- req.readline(64000) --> 231KB
	- via util.py --> 231KB

with filter:
	- req.read() --> 231KB
	- req.readline() --> 231KB
	- req.readline(64000) --> 64KB
	- via util.py --> 64KB

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

somehow the the req.readline(size) method doesnt like input filters. since i 
tested it with a binary file the file content would be in one line, but the 
unread part of this line gets lost. weird thing, but all the other lines 
after the file content (the closing boundery) gets lost, too.
this problem points definitely into the c-written part of mod_python, util.py 
just inherits it from there.
any suggestions?

jerch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.