summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2013-07-07 10:44:28 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2013-07-07 10:44:28 (GMT)
commit331c3fd874333b71bd315c0541349fcaebabfdcb (patch)
treea46d52ebc106c0470dd2d18d84ae746afe654539 /Lib/cgi.py
parent4e327c9d1cd8f7c7abbc5b9fa4384a801ff3fe59 (diff)
downloadcpython-331c3fd874333b71bd315c0541349fcaebabfdcb.zip
cpython-331c3fd874333b71bd315c0541349fcaebabfdcb.tar.gz
cpython-331c3fd874333b71bd315c0541349fcaebabfdcb.tar.bz2
Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index caa47f8..06e03b5 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -699,7 +699,7 @@ class FieldStorage:
self.encoding, self.errors)
self.bytes_read += part.bytes_read
self.list.append(part)
- if self.bytes_read >= self.length:
+ if part.done or self.bytes_read >= self.length > 0:
break
self.skip_lines()