Audit usages of unicode case-changing methods.

This commit is contained in:
Corey Farwell 2017-07-26 22:58:19 +00:00
parent 58fd2956b3
commit 23e5bfaf27
6 changed files with 30 additions and 28 deletions

View file

@ -16,6 +16,7 @@ use ipc_channel::ipc;
use net_traits::{CoreResourceMsg, IpcSend};
use net_traits::blob_url_store::{BlobBuf, get_blob_origin};
use net_traits::filemanager_thread::{FileManagerThreadMsg, ReadFileProgress, RelativePos};
use std::ascii::AsciiExt;
use std::mem;
use std::ops::Index;
use std::path::PathBuf;
@ -381,7 +382,7 @@ impl BlobMethods for Blob {
/// see https://github.com/w3c/FileAPI/issues/43
fn normalize_type_string(s: &str) -> String {
if is_ascii_printable(s) {
let s_lower = s.to_lowercase();
let s_lower = s.to_ascii_lowercase();
// match s_lower.parse() as Result<Mime, ()> {
// Ok(_) => s_lower,
// Err(_) => "".to_string()