Skip to content
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

Range requests / partial responses do not work in chrome #1086

Open
dvanadrichem-evs opened this issue May 3, 2024 · 0 comments
Open

Range requests / partial responses do not work in chrome #1086

dvanadrichem-evs opened this issue May 3, 2024 · 0 comments

Comments

@dvanadrichem-evs
Copy link

dvanadrichem-evs commented May 3, 2024

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

Summary

I am trying to render a fairly large PDF of tens of megabytes and I expect the file to be fetched in chunks using HTTP Range requests. PDF.js does support this, but it looks like this feature is not working in ng2-pdf-viewer.

Repro

Open up a chrome based browser (I tried edge and vivaldi both on Chrome/124.0.0.0).

Go to https://vadimdez.github.io/ng2-pdf-viewer/ and turn off "show all pages", open network tab and then paste a link to a fairly large PDF in the URL box on to top left hand side of the page.

Actual behaviour: Observe in the network tab that a single request is done to fetch the PDF file, the response status code is 200:

image

Expected behaviour: multiple requests to the PDF resource are done, each with response code 206 partial request.

It works correctly in FireFox, the actual behaviour in FireFox 125.0.3 is the same as expected behaviour:

image

Notes

I am a new user of this project, but this issue appears might be a regression because I have seen multiple issues that talked about range requests working properly, but something else not working. So I deduce that at that time, range requests did work.

Unfortunately I don't have access to older versions of chrome, to test of that has any influence.

Question

Any help, comments, feedback on how to troubleshoot or investigate a fix is greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant