Message190784
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. |
|
Date |
User |
Action |
Args |
2013-06-08 00:46:59 | catlee | set | recipients:
+ catlee |
2013-06-08 00:46:59 | catlee | set | messageid: <1370652419.33.0.211091292635.issue18167@psf.upfronthosting.co.za> |
2013-06-08 00:46:58 | catlee | link | issue18167 messages |
2013-06-08 00:46:57 | catlee | create | |
|