This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author catlee
Recipients catlee
Date 2013-06-08.00:46:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370652419.33.0.211091292635.issue18167@psf.upfronthosting.co.za>
In-reply-to
Content
cgi.FieldStorage uses fp.readline(1 << 16) to read in POSTed file data if no content length has been specified. All HTTP clients I've looked at terminate the file body with CRLF and then the final MIME boundary. If the file body is 65,535 bytes, and doesn't contain \n or \r\n, then fp.readline(1 << 16) will return the original 65,535 bytes of the file plus the \r from the final \r\n sequence before the final boundary string. Since \r isn't considered a line ending, it gets considered as part of the POSTed file data, and you end up with an extra \r at the end of the file data.
History
Date User Action Args
2013-06-08 00:46:59catleesetrecipients: + catlee
2013-06-08 00:46:59catleesetmessageid: <1370652419.33.0.211091292635.issue18167@psf.upfronthosting.co.za>
2013-06-08 00:46:58catleelinkissue18167 messages
2013-06-08 00:46:57catleecreate