From 331c3fd874333b71bd315c0541349fcaebabfdcb Mon Sep 17 00:00:00 2001 From: Florent Xicluna Date: Sun, 7 Jul 2013 12:44:28 +0200 Subject: Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form. --- Lib/cgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/cgi.py') diff --git a/Lib/cgi.py b/Lib/cgi.py index caa47f80128..06e03b58588 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() -- cgit v1.2.3