[mod_python] util.FieldStorage

Mike Looijmans nlv11281 at natlab.research.philips.com
Thu Oct 26 08:38:54 EDT 2006


Being the one who moved all that code around, I'm probably the one to 
explain why.

In the original version, there was a 'bad' way of detecting whether 
objects were files or not. If one used the callback mechanism, and 
provided a file-like object, this object would not be recognised as a 
file by that code, and that either resulted in the whole file being read 
into memory as a string or in some obscure exception being thrown.


Mike Looijmans
Philips Natlab / Topic Automation


Graham Dumpleton wrote:
> I'd probably hold off trying to work out any patches yourself. The more
> I look at FieldStorage the less I understand why some of the changes
> were made. I'm not talking about how a dictionary based index was
> added, but more how some of the code was shifted around when it
> probably didn't need to, with the result being that the code then became
> incompatible with versions of Trac which were out at the time. It would
> not have been that hard to maintain compatibility with Trac and still  get
> the desired gains they were after. I can see myself therefore doing a  bit
> or reorganisation of the code to fix the identified issue, but also  
> reinstate
> Trac compatibility.



More information about the Mod_python mailing list