Maximum post data length

Discussion in 'Python' started by Tim Johnson, Mar 4, 2011.

  1. Tim Johnson

    Tim Johnson Guest

    I am currently using python 2.6.
    For years I have used my own cgilib module which in turn uses the
    stand python cgi library module.

    The implementation is :
    self.form = cgi.FieldStorage(keep_blank_values=1)

    I'm looking for an approach that would enable both client- and
    server-side validation without duplication or writing additional
    scripting.

    Here's one approach I am considering:
    The form holds a hidden field with a "magic" name that can be read
    both from the DOM on the client side and from the cgilib module on the
    server side. The value for the field would be a json structure that
    would have as the upper-level keys field names and values would be
    in turn be json-like (dictionary) values.
    Example
    <input type="hidden" name="validator.descriptors"
    value="{email_address:{req:1,type:email,label:Email Address},
    name:{req:0}}"> etc ....

    The kicker might be that I have one series of forms that have
    hundreds of elements. I could end up with the value of
    `validator.descriptors' being thousands of bytes long.

    :)And don't bother to tell me that forms that large are nuts, you'd
    be preaching to the long converted.

    Does anyone know if the cgi module might choke on the size of a
    POST'ed field OR the total length of the posted form data?
    POST method only.

    And that is plan A (I have plans B and C)
    Thanks
    --
    Tim
    tim at johnsons-web.com or akwebsoft.com
    http://www.akwebsoft.com
    Tim Johnson, Mar 4, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jacky Kwok
    Replies:
    2
    Views:
    3,558
    Mark1969
    Jun 24, 2005
  2. =?Utf-8?B?Y21heQ==?=
    Replies:
    8
    Views:
    31,139
    SilentSojourner
    Apr 2, 2012
  3. Chris Hayes
    Replies:
    8
    Views:
    9,376
    DDaanV
    Oct 21, 2010
  4. Maximum size of POST data?

    , Sep 28, 2006, in forum: ASP General
    Replies:
    1
    Views:
    266
    Tim Slattery
    Sep 28, 2006
  5. phanhuyich
    Replies:
    4
    Views:
    267
Loading...

Share This Page