why is mimetypes.guess_type('a.json') not working in centos 7
问题 In Centos, why is python 2.7 prebuilt library mimetypes.guess_type not returning mimetype for json files? https://docs.python.org/2/library/mimetypes.html# I am using guess_type in mimetypes and it returns different value in centos/ubuntu. What's the pythonic way to deduce mimetype from filename in different OS? In ubuntu 14.04, it returns the correct mime type >>> import mimetypes >>> mimetypes.guess_type('a.json') ('application/json', None) But in Centos7 >>> import mimetypes >>> mimetypes