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

Clone the fetch response before reading #868

Merged
merged 1 commit into from
Jun 29, 2020
Merged

Conversation

waltjones
Copy link
Contributor

Fixes: mozilla/pdf.js#11490

In network telemetry, when reading the fetch response body, clone the response object first and read the clone.

Using any of the read methods on the original object will lock the response body when it is a ReadableStream type (and may have similar issues with other allowed types.)

@waltjones waltjones merged commit 4d61175 into master Jun 29, 2020
mudetroit pushed a commit that referenced this pull request Mar 14, 2024
Clone the fetch response before reading
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

Successfully merging this pull request may close these issues.

DomException: The object can be cloned when failing to fetch the PDF
2 participants