mimesniffer
mimesniffer copied to clipboard
A MIME type sniffer for Go.
registeredSniffers is a map that may have concurrent access. Therefore it should have a protective lock, probably a sync.RWMutex.
`application/json` is widely used in REST APIs, but isn't detected by mimesniffer, nor by the default net/http sniffer. This would be a useful addition for many people. Correct sniffing should...
1) LibreOffice documents are recognized as Zip files. Could you recognize them as OpenDocuments, like https://github.com/gabriel-vasile/mimetype? 2) This Excel file is recognized as an application/vnd.ms-powerpoint file: [Bibliothèque de macros pour...
### What is your user agent? Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0 ### What did you do? I used mimesniffer.Sniff with this MP3 file: [Bagdad cafe - I'm...