|
From: SourceForge.net <no...@so...> - 2007-01-19 20:04:33
|
Bugs item #1639570, was opened at 2007-01-19 13:55 Message generated for change (Comment added) made by benoitx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=833326&aid=1639570&group_id=164845 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 3 Private: No Submitted By: Sebastien LELONG (sirloon) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong mime type for generated html files Initial Comment: I've run statsvn on a svn project, and got generated html files, etc... Getting the mime types of html files give me no mime types at all: Ex: $ file index.html index.html: XML document text $ file -i index.html index.html: This should give: $ file -i index.html index.html: text/html Running statsvn 0.3.0 with svn client 1.3.1 (1.4 gives the same results) Cheers and thanks for your app ---------------------------------------------------------------------- >Comment By: Benoit Xhenseval (benoitx) Date: 2007-01-19 20:04 Message: Logged In: YES user_id=358115 Originator: NO Technically speaking, the files are XHTML Transitional which is xml. My understanding is that xml files must start with <?xml... The http://www.statsvn.org/statsvn/index.html is validated by http://validator.w3.org/ I think it worth investigating why this is causing an issue on those platforms... Best regards Benoit ---------------------------------------------------------------------- Comment By: Jean-Philippe Daigle (jpdaigle) Date: 2007-01-19 17:06 Message: Logged In: YES user_id=1498802 Originator: NO Ok, then your magic database should recognize "<?xml" as application/xml. I just tried it over here (Ubuntu) and I'm getting the same problem you are: my magic database looks fine, and a file starting with <?xml isn't recognized as such. Weird - will require coming back for investigation. ---------------------------------------------------------------------- Comment By: Sebastien LELONG (sirloon) Date: 2007-01-19 16:58 Message: Logged In: YES user_id=931710 Originator: YES My magic number database seems ok: the very first match for "text/html" is: <!DOCTYPE HTML But my index.html starts with: <?xml version="1.0"?> Removing this line makes the mime type beeing recognized as text/html, as exptected. I don't know where the difference between my index.html and yours comes from... Anyway, thanks for the help. ---------------------------------------------------------------------- Comment By: Jean-Philippe Daigle (jpdaigle) Date: 2007-01-19 15:20 Message: Logged In: YES user_id=1498802 Originator: NO To clarify, files on disk do not have a MIME type. These are inferred by the 'file' command by looking at the start of the file and matching contents to the "magic numbers" file. On my system, this is in "/usr/share/mime/magic", and the very first match for "text/html" is "<!DOCTYPE HTML". I just checked a sample index.html file output by statsvn, and it had the "<!DOCTYPE HTML" string at the beginning. Could you check to see if your test file has this or not? I'm trying to determine if this is your magic numbers database being different from mine, or your index.html actually not having a doctype. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=833326&aid=1639570&group_id=164845 |