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

Edge's 'fetch' without a body in the response (204) not handled #105

Open
MariusGrandeAndersen opened this issue Jan 29, 2019 · 2 comments

Comments

@MariusGrandeAndersen
Copy link

MariusGrandeAndersen commented Jan 29, 2019

Our server has certain requests giving 204 No Content as a response to a fetch request.

On Chrome, the response object in response.js has a body that is ReadableStream (it is empty though) and bodyUsed = true.

On Microsoft Edge, the response object in response.js has a body = null and bodyUsed = false.

In the source code of response.js if mode === fetch then it expects a body, but this is not the case in Microsoft Edge.

Can you please add a "if response.body === null" style guard on the fetch response logic?

@SaschaAusUlm
Copy link

We are hitting the same issue.

var reader = response.body.getReader()

runs into an error on Edge because the reponse has no body.

@charlesfries
Copy link

charlesfries commented Apr 10, 2019

I submitted a PR that fixes the issue: #110

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

3 participants