diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-13 09:42:03 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-13 09:42:03 +0000 |
commit | 56f9f0ad48c842ba90c04b24469730b9a78f861d (patch) | |
tree | ab05a0ce8845e52759863fb9c6672e30fd6a5cb1 /net/base | |
parent | afbe90b1f4e88d0e5d189ecf98f295f4e2c39940 (diff) | |
download | chromium_src-56f9f0ad48c842ba90c04b24469730b9a78f861d.zip chromium_src-56f9f0ad48c842ba90c04b24469730b9a78f861d.tar.gz chromium_src-56f9f0ad48c842ba90c04b24469730b9a78f861d.tar.bz2 |
We need to sniff from file:// URLs so that we don't do silly things like try to
download README files.
BUG=18342
Review URL: http://codereview.chromium.org/916003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/mime_sniffer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/base/mime_sniffer.cc b/net/base/mime_sniffer.cc index 8e063cb..1950c4b 100644 --- a/net/base/mime_sniffer.cc +++ b/net/base/mime_sniffer.cc @@ -488,7 +488,8 @@ bool ShouldSniffMimeType(const GURL& url, const std::string& mime_type) { bool sniffable_scheme = url.is_empty() || url.SchemeIs("http") || url.SchemeIs("https") || - url.SchemeIs("ftp"); + url.SchemeIs("ftp") || + url.SchemeIsFile(); if (!sniffable_scheme) { should_sniff_counter->Add(1); return false; |