-
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
Enable "read with streaming" test in test/unit/network_spec.js #8851
Comments
Yes. I don't see why not. |
Hi. I would like to solve this issue. Please assign me this. And also, please guide me how do i move forward in contributing more to this repository ! |
@aryanshar That's fast, I was still typing the motivation for the good-beginner-bug label. Here it goes: This bug consist of two parts. The first part is fully explained in the original report. For the second part, we need to update the if condition to logic along the lines of "if (!isFirefoxWithMozChunkedEncodingSupport && !isFetchWithStreamSupport)` (choose shorter but understandable variable if you wish). The first variable name is based on the current content of the if-statement (by the way, that has a flaw too. If Firefox 90 becomes available, the condition is incorrect). The second variable should indicate whether ReadableStream is supported (see e.g. cd95b42). |
Is the issue still up? I would like to solve if it is. |
There is a PR above, but there was no response since 24 October. You're welcome to use that PR, and in particular the comments there, as inspiration to create a new PR so we can hopefully merge it soon. |
Hi there! |
Under the section titled "Browser compatibility", there is a summary of native browser support across desktop and mobile platforms. What does 'streaming response body' refer to, and is it relevant to our needs? Under whatwg's streams standard, a readable stream is a class that uses chunks...is that what line 70 in the code cited above refers to? As an aside, instead of checking for browser support of fetch() by looking at the user-agent header for information on the browser version, can we do something like |
@choilmto I have updated the MDN pages to be more clear. Take another look if you want to get a better understanding. Line 70 in the above code refers to the non-standard way of obtaining a response stream in Firefox, via the
The user agent line is still necessary; Alternatively, feature detection can be used, as shown at: Lines 55 to 72 in edaf4b3
|
Hi. I would like to solve this issue. Please assign me this. And also, please guide me how do i move forward in contributing more to this repository ! |
Resolved! |
The "read with streaming" test looks like this:
pdf.js/test/unit/network_spec.js
Lines 67 to 77 in a4cc85f
There are two issues here:
pending('Streaming not supported by user agent');
instead of an incorrectdone()
call.@yurydelendik Can the test be enabled for other browsers?
The text was updated successfully, but these errors were encountered: