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 Jim.Jewett
Recipients Jim.Jewett, berker.peksag, corona10, gvanrossum, serhiy.storchaka, xtreak
Date 2020-07-27.23:15:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595891718.03.0.525713300999.issue40841@roundup.psfhosted.org>
In-reply-to
Content
The standard itself says that it only applies to content served over http; if the content is retrieved by ftp or from a file system, then you should trust that.  I don't notice that in the code you pointed to.

So maybe filetype is the right answer if the data isn't coming over the network?  For whatwg demonstration code, it is reasonable to assume that, but in python -- at a minimum, you should document the assumption prominently in the docs and docstring.
History
Date User Action Args
2020-07-27 23:15:18Jim.Jewettsetrecipients: + Jim.Jewett, gvanrossum, berker.peksag, serhiy.storchaka, corona10, xtreak
2020-07-27 23:15:18Jim.Jewettsetmessageid: <1595891718.03.0.525713300999.issue40841@roundup.psfhosted.org>
2020-07-27 23:15:18Jim.Jewettlinkissue40841 messages
2020-07-27 23:15:17Jim.Jewettcreate