-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progressive rendering not working #9609
Comments
bump - Having same issue |
Unfortunately it's simply impossible for anyone to help with only a description/screen-shot of the problem, please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):
|
@timvandermeij @Snuffleupagus @lucaong Hi, I know what the problem is here. Yesterday I was implementing Range Requests using This is causing to not work properly Range-requests due to case-sensitive headers implementation of PDF.js, could you please fix this? According to RFC 7230 (HTTP/1.1):
https://www.rfc-editor.org/rfc/rfc7230#section-3.2 Also, RFC 7540 (HTTP/2):
|
bump - I'm also running into this issue with Java Spring with Apache tomcat, which also sends headers as lower-case. The code that seems to check the response header is this, and I didn't see any modifications to the header casing before it goes into the function https://github.com/mozilla/pdf.js/blob/master/src/display/network_utils.js
However, based on this issue, I'm also seeing conflicting information on whether it works with lowercase or not. Could we get a confirmation one way or another on whether lower-case headers don't work and should be supported according to the RFC specs? |
@kentingnguyen I can confirm you that lowercase headers do not make a difference. I was able to achieve progressive rendering by correctly implementing my backend logic Related issue #14514 My backend implementation in Python using range requests, maybe you can translate it to Java Another related issue |
Attach (recommended) or Link to PDF file here:
Configuration:
What is the expected behavior?
I have a linearized PDF, and a server returning
accept-ranges: bytes
. I expect the PDF to be progressively loaded/rendered, and to observe Range requests with 206 response codes, but instead no Range request is made, and the whole PDF is loaded and rendered in bulk.I read a lot of other issues and responses related to Range requests, but I still cannot find what is wrong in my setup. CORS headers are OK,
Accept-Ranges
header is returned by the server, Range requests are supported (as tested with CURL).Two specific things in my setup are:
accept-ranges
is lower case (PDF is on Google Cloud Storage). But headers should be case insensitive.accept-ranges
?As you can see, the
Accept-Ranges
header is properly returned:Any idea?
The text was updated successfully, but these errors were encountered: