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:
parent
2019139a3c
commit
5ceb3f4cf7
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ Zotero.MIME = new function(){
|
||||||
|
|
||||||
// Magic numbers
|
// Magic numbers
|
||||||
var _snifferEntries = [
|
var _snifferEntries = [
|
||||||
["%PDF-", "application/pdf", 0],
|
["%PDF-", "application/pdf"],
|
||||||
["%!PS-Adobe-", 'application/postscript', 0],
|
["%!PS-Adobe-", 'application/postscript', 0],
|
||||||
["%! PS-Adobe-", 'application/postscript', 0],
|
["%! PS-Adobe-", 'application/postscript', 0],
|
||||||
["\uFFFD\uFFFD\x11\u0871\x1A\uFFFD\x00\x00", "application/msword", 0],
|
["\uFFFD\uFFFD\x11\u0871\x1A\uFFFD\x00\x00", "application/msword", 0],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue