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

fix(cli): response arrayBuffer, blob, text and json null return #7387

Merged

Conversation

caspervonb
Copy link
Contributor

@caspervonb caspervonb commented Sep 7, 2020

This fixes an issue where response.arrayBuffer, response.blob, response.text and response.json returns null on a response object without a body.

These should act as if the buffer source is 0 bytes in length and resolve immediately.
See https://fetch.spec.whatwg.org/#concept-body-consume-body.

Fixes #7338

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix @caspervonb

@bartlomieju bartlomieju merged commit 1d0f1ed into denoland:master Sep 8, 2020
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.

std fetch raises TypeError when return body is empty since v1.3
2 participants