From 4721fd1c6a89aac101f26c0b2eb60e5dc131df27 Mon Sep 17 00:00:00 2001 From: Jonathan Giddy Date: Tue, 23 Feb 2016 14:09:56 +0000 Subject: [PATCH] Fix PDF signature to match spec --- components/net/mime_classifier.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/net/mime_classifier.rs b/components/net/mime_classifier.rs index d00a3251ec8..3b97566f018 100644 --- a/components/net/mime_classifier.rs +++ b/components/net/mime_classifier.rs @@ -1006,8 +1006,8 @@ impl ByteMatcher { //The string "%PDF-", the PDF signature. fn application_pdf() -> ByteMatcher { ByteMatcher { - pattern: b"%PDF", - mask: b"\xFF\xFF\xFF\xFF", + pattern: b"%PDF-", + mask: b"\xFF\xFF\xFF\xFF\xFF", content_type: ("application", "pdf"), leading_ignore: &[] }