-
Bug
-
Resolution: Won't Do
-
Normal
-
rhel-7.9.z
-
None
-
Important
-
rhel-sst-cs-plumbers
-
ssg_core_services
-
8
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
x86_64
-
None
Description of problem:
file returns "text/x-c+" for an HTML file that contains a C+ code example.
Version-Release number of selected component (if applicable):
file-5.11
How reproducible:
Every time
Steps to Reproduce:
1. file --mime-type <file>.html
Actual results:
<file>.html: text/x-c++
Expected results:
<file>.html: text/html
Additional info:
Invoking xdg-open on an unrecognized windowing system invokes xdg-mime which, in turn, invokes this file command. The result is that xdg-open opens the file in a text editor instead of in a web browser.
This flow works on most of my .html files, but fails on the attached html files.
I found that disrupting the keywords in the code sample included in the file - e.g., inserting a space in the middle of the first instances of "template", "class", "private", and "public" in the attached file, caused file to return the desired mime type.
- external trackers