Author X-Istence
Recipients Decorater, X-Istence, rr-, vstinner
Date 2016-09-27.03:40:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On line #890 in self.make_file() the check for _binary_file should be changed to also check for self.length >= 0.


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:02X-Istencesetrecipients: + X-Istence, vstinner, Decorater, rr-
2016-09-27 03:40:02X-Istencesetmessageid: <>
2016-09-27 03:40:02X-Istencelinkissue27777 messages
2016-09-27 03:40:02X-Istencecreate