dart-lang / http

A composable API for making HTTP requests in Dart.
https://pub.dev/packages/http
BSD 3-Clause "New" or "Revised" License
1.01k stars 343 forks source link

Allow `1000` as a WebSocket close code #1211

Closed brianquinlan closed 1 month ago

brianquinlan commented 1 month ago

Fixes https://github.com/dart-lang/http/issues/1203


Contribution guidelines:
- See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.
catapop84 commented 1 month ago

Hello, You should allow a range between 1000-4999 according to official doc: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code and https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5