ahupp / python-magic

A python wrapper for libmagic
Other
2.6k stars 280 forks source link

magic.from_buffer is returning 'application/csv' for CSV files instead of 'text/csv' #263

Closed CHelfgott closed 2 years ago

CHelfgott commented 2 years ago

The latter is the correct MIME type according to RFC 7111, and I know for a fact that magic returned 'text/csv' at some point in the past (although I have not rolled back my installation to check which version did so).

ahupp commented 2 years ago

The mime type returned is determined by the underlying libmagic installation rather than python-magic. I'd compare with what the file command returns, and check the version of the install.

CHelfgott commented 2 years ago

thank you, I eventually twigged to that myself.