Jim Jewett <jimjjew...@gmail.com> added the comment:
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. ---------- nosy: +Jim.Jewett _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40841> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com