summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-11 18:26:09 (GMT)
committerGuido van Rossum <guido@python.org>1999-06-11 18:26:09 (GMT)
commit60a3bd81306f2d3c818a4765c55a6785e083efff (patch)
tree7aff937a953444f500d312f7212bcf95134e24a5 /Lib/cgi.py
parent122473fc70ba3c1c5c112b8be78d81a963f3cf6f (diff)
downloadcpython-60a3bd81306f2d3c818a4765c55a6785e083efff.zip
cpython-60a3bd81306f2d3c818a4765c55a6785e083efff.tar.gz
cpython-60a3bd81306f2d3c818a4765c55a6785e083efff.tar.bz2
After more discussion with Jim, change the behavior so that only a
*missing* content-type at the outer level of a POST defaults to urlencoded. In all other circumstances, the default is read_singe().
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index b9c4f0d..efa492a 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -899,16 +899,8 @@ class FieldStorage:
self.read_urlencoded()
elif ctype[:10] == 'multipart/':
self.read_multi(environ, keep_blank_values, strict_parsing)
- elif self.outerboundary or method != 'POST':
- # we're in an inner part, but the content-type wasn't something we
- # understood. default to read_single() because the resulting
- # FieldStorage won't be a mapping (and doesn't need to be).
- self.read_single()
else:
- # we're in an outer part, but the content-type wasn't something we
- # understood. we still want the resulting FieldStorage to be a
- # mapping, so parse it as if it were urlencoded
- self.read_urlencoded()
+ self.read_single()
def __repr__(self):
"""Return a printable representation."""