Fix invalid MIME checkers

This commit is contained in:
Jonathan Giddy 2016-02-19 13:11:41 +00:00
parent 208bae7f2e
commit 54b07bae91

View file

@ -678,7 +678,7 @@ impl ByteMatcher {
fn image_webp() -> ByteMatcher { fn image_webp() -> ByteMatcher {
ByteMatcher { ByteMatcher {
pattern: b"RIFF\x00\x00\x00\x00WEBPVP", pattern: b"RIFF\x00\x00\x00\x00WEBPVP",
mask: b"\xFF\xFF\xFF\xFF\x00\x00\x00\x00,\xFF\xFF\xFF\xFF\xFF\xFF", mask: b"\xFF\xFF\xFF\xFF\x00\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF",
content_type: ("image", "webp"), content_type: ("image", "webp"),
leading_ignore: &[] leading_ignore: &[]
} }
@ -742,7 +742,7 @@ impl ByteMatcher {
fn application_ogg() -> ByteMatcher { fn application_ogg() -> ByteMatcher {
ByteMatcher { ByteMatcher {
pattern: b"OggS", pattern: b"OggS",
mask: b"\xFF\xFF\xFF\xFF\xFF", mask: b"\xFF\xFF\xFF\xFF",
content_type: ("application", "ogg"), content_type: ("application", "ogg"),
leading_ignore: &[] leading_ignore: &[]
} }
@ -992,7 +992,7 @@ impl ByteMatcher {
fn application_pdf() -> ByteMatcher { fn application_pdf() -> ByteMatcher {
ByteMatcher { ByteMatcher {
pattern: b"%PDF", pattern: b"%PDF",
mask: b"\xFF\xFF\xFF\xFF\xFF", mask: b"\xFF\xFF\xFF\xFF",
content_type: ("application", "pdf"), content_type: ("application", "pdf"),
leading_ignore: &[] leading_ignore: &[]
} }