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

fetch: support for 101 status code #6059

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

marcosc90
Copy link
Contributor

@marcosc90 marcosc90 commented Jun 2, 2020

This PR adds support for 101 status code responses in case we want to support it (If not just close it, I don't have a strong opinion on this).

Being honest 101 it's rarely used except for WebSockets and we use Deno.connect for that.


I find the spec is a bit confusing regarding 1xx status codes.

Here's how it works on other browsers:

  • Firefox: 101 responses work correctly
  • Chrome: fetch just stays idle and never resolves
  • Opera: fetch just stays idle and never resolves

In all browsers, the Response constructor fails if status === 101, the same happens in Deno.


Deno fetch fails for all 1xx except 101 with: invalid HTTP version parsed.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - @marcosc90 I don't have a strong opinion about this either - but given that you've done research around this I think we should go with this.

@ry ry merged commit a1915a0 into denoland:master Jun 3, 2020
@marcosc90 marcosc90 deleted the fetch-1xx-status-code branch June 3, 2020 13:44
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Jun 5, 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.

2 participants