Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #218 (closed defect: invalid)

Opened 13 years ago

Last modified 12 years ago

Large textarea data POST

Reported by: jrmckernan@… Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version: 0.8
Severity: normal Keywords:


I'm encountering an issue when posting large amounts of text data through an HTML textarea. The functionality works fine until a certain amount of data is put into the textarea then it barfs out. The log file contains the following lines when this happens:

2005/12/13 08:39:24 HTTP INFO - POST /survey2/save HTTP/1.1 2005/12/13 08:39:24 INFO Traceback (most recent call last):


"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cher rypy/_cphttptools.py", line 271, in run



"/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cher rypy/_cphttptools.py", line 502, in main

body = page_handler(*args, cherrypy.request.paramMap)


"/usr/local/lib/python2.4/site-packages/TurboGears-0.8a3-py2.4.egg/turbog ears/controllers.py", line 121, in newfunc

output = func(self, *args, kw)

TypeError?: save() got an unexpected keyword argument '34567890123456789012345678 90123456789012345678901234567890123456789012345678901234567890123456789012345678 90123456789012345678901234567890123456789012345678901234567890123456789012345678 90123456789012345678901234567890123456789012345678901234567890123456789012345678 90123456789012345678901234567890123456789012345678901234567890123456789012345678 901234567890123456789012345678901234567890123456789012'

This output is the result of putting a string of about 3-4k of just '0123456789' repeating over and over.

Here is the environment: -TurboGears-0.8a3-py2.4.egg -CherryPy?-2.1.0_rc2-py2.4.egg -Python 2.4

Change History

comment:1 Changed 13 years ago by slate

Maybe cherrypy's config option helps you.


path server.maxRequestBodySize: maximum acceptable size of a request body, in bytes (defaults to 100MB). If a longer request body arrives, the server will interrupt it and return a 413 error. This setting can be configured per path. This is useful to limit the size of uploaded files. Set it to zero to remove the limit

comment:2 Changed 13 years ago by jrmckernan@…


I haven't changed the default server.maxRequestBodySize, and the amount of data I'm posting is well beloe 100MB (its happening on as little as 4KB)

Anyhow, we've gone ahead and reproduced it with a very simple site.

Here's the controllers.py that I'm working with:

import turbogears from turbogears import controllers import model

class Root(controllers.Root):

@turbogears.expose() def index(self):

return dict(tg_template="testapp.templates.welcome")

@turbogears.expose() def save(self, answer=None):


sqlobj = model.answers(answer=answer) print "Woo" return dict(tg_template="testapp.templates.success")


print "Booo" return dict(tg_template="testapp.templates.welcome")


I'm running: Python 2.4 (#2, Feb 20 2005, 21:40:43) CherryPy?-2.1.0_rc2-py2.4.egg TurboGears-0.8a3-py2.4.egg apache-2.0.55

The app itself is located at:  https://2.surveyweb.org/ . This is an apache server serving ssl sitting in front of the turbogear webapp. It uses mod_proxy & mod_rewrite to proxy through to the App via:

RewriteRule? /(.*)  http://localhost:9000/$1 [P]

I've put up a copy of the entire app, in a tgz, @  http://daboyz.org/~mike/testapp.tgz

It should be noted that when we hit the cherrypy HTTP server directly (the ported URL) there doesn't seem to be an issue (i.e., you can submit as much data as you like )

Thanks again!

comment:3 Changed 13 years ago by slate

Maybe you have a LimitRequestBody? directive in the apache conf. see:  http://httpd.apache.org/docs/2.0/mod/core.html

comment:4 Changed 13 years ago by godoy

Any news on that? Is this still an issue? I'm using a similar setup -- I don't have mod_rewrite here -- including the SSL part and I don't see this with current code. If this is solved for you, please close this bug with "worksforme". Otherwise updating to the latest 0.8 (or 0.9) release and providing us the new error message for the above code would be nice.

comment:5 Changed 13 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to invalid

no reply for 5months, this kind of thing should go first to the mailing list.

Note: See TracTickets for help on using tickets.