Message277482
On line #890 in self.make_file() the check for _binary_file should be changed to also check for self.length >= 0.
https://github.com/python/cpython/blob/3.4/Lib/cgi.py#L890
becomes:
if self._binary_file or self.length >= 0:
_binary_file is only ever set if there is a content disposition, which there is not in the test case provided. In the case of no content disposition we can use the content-length as a hint that we have a file that has been uploaded. All files uploaded should be treated as binary if they are not a text type.
This is a duplicate of #27308, however the patch in that report is incorrect IMHO. |
|
Date |
User |
Action |
Args |
2016-09-27 03:40:02 | X-Istence | set | recipients:
+ X-Istence, vstinner, Decorater, rr- |
2016-09-27 03:40:02 | X-Istence | set | messageid: <1474947602.79.0.570413647775.issue27777@psf.upfronthosting.co.za> |
2016-09-27 03:40:02 | X-Istence | link | issue27777 messages |
2016-09-27 03:40:02 | X-Istence | create | |
|