After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611502 - Fails to identify http://samples.mplayerhq.hu/game-formats/interplay-mve/baldursgate-camp.mve as binary
Fails to identify http://samples.mplayerhq.hu/game-formats/interplay-mve/bald...
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-03-01 18:12 UTC by Gustavo Noronha (kov)
Modified: 2010-03-15 13:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed solution (2.13 KB, patch)
2010-03-01 18:16 UTC, Gustavo Noronha (kov)
committed Details | Review

Description Gustavo Noronha (kov) 2010-03-01 18:12:40 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.
Comment 1 Gustavo Noronha (kov) 2010-03-01 18:16:32 UTC
Created attachment 154961 [details] [review]
proposed solution

This makes the URL be properly identified as binary.
Comment 2 Dan Winship 2010-03-01 18:20:13 UTC
did you talk to Adam?

are we sure Chromium is ignoring the parameters, as opposed to just accepting both "utf-8" and "UTF-8"?
Comment 3 Gustavo Noronha (kov) 2010-03-08 17:38:29 UTC
(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
Comment 4 Adam Barth 2010-03-09 00:37:06 UTC
That sounds fine.  If you decide to do this, I'll update the spec to match.
Comment 5 Dan Winship 2010-03-13 17:04:20 UTC
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 6 Gustavo Noronha (kov) 2010-03-15 13:43:09 UTC
Comment on attachment 154961 [details] [review]
proposed solution

Added a note that the spec is going to be updated. Thanks!