summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-02-06 13:59:32 (GMT)
committerGitHub <noreply@github.com>2022-02-06 13:59:32 (GMT)
commit6c4e44ef8ab550f846ba056d4561efb8256b8eab (patch)
tree0abfe06e915f4551c6a628a63193f0f60bb8f97b
parentfa90e48c53384889d28f171170ab79d777d46949 (diff)
downloadcpython-6c4e44ef8ab550f846ba056d4561efb8256b8eab.zip
cpython-6c4e44ef8ab550f846ba056d4561efb8256b8eab.tar.gz
cpython-6c4e44ef8ab550f846ba056d4561efb8256b8eab.tar.bz2
bpo-23952: Document cgi module's maxlen variable (GH-30338)
-rw-r--r--Doc/library/cgi.rst5
-rwxr-xr-xLib/cgi.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index c151f04..a2957ba 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 6cb8cf2..22897a1 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