Find direct PDF from page URL if Content-Type includes invalid parameter
The 'application/pdf' Content-Type shouldn't have any parameters, but a site was returning 'application/pdf;charset=ISO-8859-1', so instead just look for the 'application/pdf' prefix.
This commit is contained in:
parent
368e225ab8
commit
9ed8bed778
1 changed files with 1 additions and 1 deletions
|
@ -1762,7 +1762,7 @@ Zotero.Attachments = new function(){
|
|||
}
|
||||
|
||||
// If DOI resolves directly to a PDF, save it to disk
|
||||
if (contentType == 'application/pdf') {
|
||||
if (contentType.startsWith('application/pdf')) {
|
||||
Zotero.debug("URL resolves directly to PDF");
|
||||
await Zotero.File.putContentsAsync(path, blob);
|
||||
await _enforcePDF(path);
|
||||
|
|
Loading…
Reference in a new issue