From: Hugo van Kemenade Date: Sun, 6 Feb 2022 13:59:32 +0000 (+0200) Subject: bpo-23952: Document cgi module's maxlen variable (GH-30338) X-Git-Tag: v3.11.0a6~303 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c4e44ef8ab550f846ba056d4561efb8256b8eab;p=thirdparty%2FPython%2Fcpython.git bpo-23952: Document cgi module's maxlen variable (GH-30338) --- diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index c151f04dfb8d..a2957ba5a68a 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -21,6 +21,11 @@ Support module for Common Gateway Interface (CGI) scripts. This module defines a number of utilities for use by CGI scripts written in Python. +The global variable ``maxlen`` can be set to an integer indicating the maximum +size of a POST request. POST requests larger than this size will result in a +:exc:`ValueError` being raised during parsing. The default value of this +variable is ``0``, meaning the request size is unlimited. + Introduction ------------ diff --git a/Lib/cgi.py b/Lib/cgi.py index 6cb8cf28bd66..22897a14a9c1 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -13,6 +13,11 @@ This module defines a number of utilities for use by CGI scripts written in Python. + +The global variable maxlen can be set to an integer indicating the maximum size +of a POST request. POST requests larger than this size will result in a +ValueError being raised during parsing. The default value of this variable is 0, +meaning the request size is unlimited. """ # History