Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form.

This commit is contained in:
Florent Xicluna 2013-07-07 12:44:28 +02:00
parent 4e327c9d1c
commit 331c3fd874
3 changed files with 49 additions and 1 deletions

View file

@ -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()