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
This commit is contained in:
Dan Stillman 2011-01-07 04:10:52 +00:00
parent 2019139a3c
commit 5ceb3f4cf7

View file

@ -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],