[mod_python] util.FieldStorage wrong about method restrictions

Nic James Ferrier nferrier at tapsellferrier.co.uk
Mon Aug 14 09:13:00 EDT 2006

Mike Looijmans <nlv11281 at natlab.research.philips.com> writes:

>> Really that is the only difference. Which is why both cgi.FieldStorage
>> and util.FieldStorage should allow PUT as well as POST.
> Your patch will also break any existing code that uses PUT to upload files to the server in any 
> form. By assuming that the body contains form data, the FieldStorage object will consume the body 
> and it is lost for the request.

Will it?

util.FieldStorage tests the content type before doing anything. 

Also, why would you use util.FieldStorage to retrieve a submitted
file? Surely you'd just read it?

Nic Ferrier
http://www.tapsellferrier.co.uk   for all your tapsell ferrier needs

More information about the Mod_python mailing list