Closed winwinashwin closed 2 years ago
This is a question for libmagic, which actually implements the filetype identification. But in general this seems like a hard thing to distinguish since they are syntactically the same and only differ by extension and convention.
Description
Not sure if this is really a bug, when trying to guess mimetype of c++ source files, magic returns
text/x-c++
. Same happens for header files as well. But as per mime-support standard shouldn't the output betext/x-c++src
andtext/x-c++hdr
respectively? Ref: Check lines#768
and#769
of /etc/mime.typesTo Reproduce
Output:
text/x-c++