Rectangle 27 0

javascript Php doesn't return the correct mime type?


I think to successfully verify the contents of .js and .css files, you have to either rely on the extension, or actually parse them with the correct, appropriate parser.

I'm not intimately familiar with the workings of fileinfo, but I think this is normal. Text files (and that's what CSS and JS are) provide no clear pointers as to what content it has. They have no header bytes, no defined structure. So all poor fileinfo can do is guess - with poor results, as you can see.

Note