GNOME Bugzilla – Bug 611502
Fails to identify http://samples.mplayerhq.hu/game-formats/interplay-mve/baldursgate-camp.mve as binary
Last modified: 2010-03-15 13:43:18 UTC
The problem is the server sends "text/plain; charset=utf-8" as Content-Type. We currently follow the spec, and are very strict regarding what text/plain parameters we accept when checking, so we end up deciding to sniff this as text/plain before we have a chance to apply the "text or binary" algorithm. I propose we follow Chromium, and be less strict on what text/plain variants we accept - meaning we will disregard the parameters, and only check if the content type is text/plain.
Created attachment 154961 [details] [review] proposed solution This makes the URL be properly identified as binary.
did you talk to Adam? are we sure Chromium is ignoring the parameters, as opposed to just accepting both "utf-8" and "UTF-8"?
(In reply to comment #2) > did you talk to Adam? No, I haven't, I'll draw his attention to this bug. > are we sure Chromium is ignoring the parameters, as opposed to just accepting > both "utf-8" and "UTF-8"? Yes, I'm pretty sure. The code only checks for text/plain, and never touches the parameters at all. Here's the relevant part: http://src.chromium.org/cgi-bin/gitweb.cgi?p=chromium.git;a=blob;f=net/base/mime_sniffer.cc;h=53e765e6f8d585cabd40338e59a6a7805114e4eb;hb=8cbcf36ea2e7f1d9e5923f5db6e58e56fae4e49d#l517
That sounds fine. If you decide to do this, I'll update the spec to match.
Comment on attachment 154961 [details] [review] proposed solution ok, just update the commit message to clarify that the spec is going to be changed, as opposed to us violating it
Comment on attachment 154961 [details] [review] proposed solution Added a note that the spec is going to be updated. Thanks!