Bugzilla – Bug 894
Option to ignore browser-supplied MIME type for validating uploaded files
Last modified: 2015-03-31 02:59:44 CEST
Created attachment 216 [details] Citation Style Language specification for American Heart Association grants From what I can tell, the validator uses the browser-supplied MIME type to determine if the uploaded file is an XML file (when using XML parser at least). The problem is that the browser supplies the MIME type based on the file extension (at least in Windows; tested with Chrome and Firefox), which means that XML based files that have unconventional extensions (e.g. csl extension for citation sytle language) are rejected. The "Be lax about HTTP Content-Type" option does not help in this case. It would be nice to be able to ignore the supplied MIME type for such files. Currently, you have to either rename the file to .xml or copy-paste the contents to validate it. Attaching a sample CSL file for testing. The contents of this file validate against the schema specified at https://github.com/citation-style-language/schema/raw/v1.0/csl.rnc using XML parser and "Be lax about HTTP Content-Type" option when copy-pasted into the validator, but not when uploaded.
This is fixed now https://github.com/validator/validator/issues/30