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 are broken when RANGE_CHUNK_SIZE != 64k #5464

Closed
CodingFabian opened this issue Nov 1, 2014 · 7 comments
Closed

Range requests are broken when RANGE_CHUNK_SIZE != 64k #5464

CodingFabian opened this issue Nov 1, 2014 · 7 comments

Comments

@CodingFabian
Copy link
Contributor

We just noticed that PDF loaded via range requests no longer work in Safari and Chrome
I will investigate and update this ticket. I also so that disableRange is no longer working. Maybe its related to the streaming improvements?
It does work with firefox.

@CodingFabian
Copy link
Contributor Author

i suspect #5402 being faulty @yurydelendik

@CodingFabian CodingFabian changed the title Range requests are broken Range requests are broken when RANGE_CHUNK_SIZE != 64k Nov 1, 2014
@CodingFabian
Copy link
Contributor Author

I narrowed it down. for our build we set
RANGE_CHUNK_SIZE = 262144;

Once we reverted to 65536 it was working again.
I suspect there might be an assumption about this value.

@yurydelendik
Copy link
Contributor

This report is a little bit confusing:

  1. Refactors PdfDataLister buffering. #5402 is not related to generic viewer and affects only Firefox extension
  2. range requests never worked for Safari due to caching bug in the browser
  3. STR are not provided

We don't turn on range requests for small files due to HTTP handling overhead. Please provide more details, e.g. example online and steps to reproduce.

@yurydelendik
Copy link
Contributor

See

if (length <= 2 * RANGE_CHUNK_SIZE) {
for small file check.

@CodingFabian
Copy link
Contributor Author

sorry Yury, I was a bit stressed out because on production no pdfs were showing anymore.
Disabling Range request by filtering the accept-Ranges header made them work.
#disableRange=true was not working.

This was observed in Chrome, where I can confirm that all chunks were downloaded, but the rendering broke. The file was 600k, so it required multiple range requests to download.

After removing our modification of the range chunk size there were more range requests but the document was then rendering fine.
I wont be able to provide a better STR until next weekend, but wanted to give you an early warning of something broken with range requests.

@CodingFabian
Copy link
Contributor Author

I am going to close the issue until I have STR

@CodingFabian
Copy link
Contributor Author

I need to apologize. it was not caused by pdfjs but changes in our backend when doing decryption for range requests. it was not showing fro smaller ranges but bigger caused problems. sorry for any troubles caused.

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

No branches or pull requests

2 participants