mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.36k stars 9.97k forks source link

Fails to load the specific pdf URL in all browsers #9334

Closed yurivict closed 6 years ago

yurivict commented 6 years ago

This URL fails in Firefox 57.0.3 and Chromium 61.0.3163.100

https://mozilla.github.io/pdf.js/web/viewer.html?file=http://sci-hub.la/downloads/8eee/10.1038@s41561-017-0044-x.pdf

In Firefox, it says:

Unexpected server response.
PDF.js v2.0.246 (build: 25c7a8c2)
Message: Unexpected server response (0) while retrieving PDF "http://sci-hub.la/downloads/8eee/10.1038@s41561-017-0044-x.pdf".

In Chromium, it says:

An error occurred while loading the PDF.
PDF.js v2.0.246 (build: 25c7a8c2)
Message: Failed to fetch

The pdf URL itself is obviously valid, and is loaded into browsers fine. I am pretty sure pdfs from this site used to work with PdfJs fine before.

timvandermeij commented 6 years ago

In the console I get the following message: Loading of mixed active content ‘http://sci-hub.la/downloads/8eee/10.1038@s41561-017-0044-x.pdf’ blocked (or similar wording because I translated this from the Dutch UI). This is to be expected, because it's a cross-domain request, which is blocked by the browser by default for security reasons.