From 5ceb3f4cf7f4beb506ceffe3c1167b9c4815fb13 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 7 Jan 2011 04:10:52 +0000 Subject: [PATCH] Closes #1754, [PATCH] MIME type sniffing of PDFs is too strict for some real-world files Look for "%PDF-" anywhere in the first 128 bytes --- chrome/content/zotero/xpcom/mime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/mime.js b/chrome/content/zotero/xpcom/mime.js index 4120c171d..0a91c7e54 100644 --- a/chrome/content/zotero/xpcom/mime.js +++ b/chrome/content/zotero/xpcom/mime.js @@ -37,7 +37,7 @@ Zotero.MIME = new function(){ // Magic numbers var _snifferEntries = [ - ["%PDF-", "application/pdf", 0], + ["%PDF-", "application/pdf"], ["%!PS-Adobe-", 'application/postscript', 0], ["%! PS-Adobe-", 'application/postscript', 0], ["\uFFFD\uFFFD\x11\u0871\x1A\uFFFD\x00\x00", "application/msword", 0],