I am using cherrypy 2.3 in conjunction with turbogears 1.0.8 and am
having
trouble with large form value being decoded by cherrypy.
The error manifests itself as such:
Traceback (most recent call last):
File "/home/bisquik/bisque-stable/bqenv/lib/python2.5/site-packages/
CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 114, in _run
self.processBody()
File "/home/bisquik/bisque-stable/bqenv/lib/python2.5/site-packages/
CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 249, in
processBody
self.params.update(httptools.paramsFromCGIForm(forms))
File "/home/bisquik/bisque-stable/bqenv/lib/python2.5/site-packages/
CherryPy-2.3.0-py2.5.egg/cherrypy/lib/httptools.py", line 379, in
paramsFromCGIForm
value = valueList.value # It's a regular field
File "/usr/lib/python2.5/cgi.py", line 551, in __getattr__
value = self.file.read()
TypeError: read() takes exactly 2 arguments (1 given)
We have tracked this down to the special handling done by
_cpcgifs.FieldStorage
The issues is in multiform fields that have field length of over 1000
bytes. The
FieldStorage class silently converts these into file-like objects
backed up on the file system
by a temporary file.
We have resolved the issue by replacing references to
_cpcgifs.FieldStorage to
simply use the standard module cgi.FieldStorage in _cphttptools.py.
Aft this change the field problem is handled correctly.
However, since we distribute the software, we would prefer not to have
to provide patched
versions of cherrypy.. Are there any plans on providing a 2.3.1
release in the future?