Allign websocket sending close codes with RFC

オープン
#1,642 コメント 4 件 リアクション 3 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
networking

調査の方向性

autobahn/websocket/protocol.py の2054行目付近から始め、close code の検証を、リンク先の IANA WebSocket close code の規則と比較してください。コード 1000–1015 がどのように扱われているか、また実装がそれらを意図的に除外しているかを確認してください。対応している標準の close code が記載された RFC の規則と一致し、関連する動作がプロジェクト既存のチェックでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

needs-discussion websocket

Hi everyone,
I use autobahn with daphne/Django for a websocket application.
We got a usecase where we disconnect the client and reset the connection. To show this in the log files and properly us another reconnect strategy, we decided to use different websocket close codes. (e.g. 1012; Service Restart). We realized that this codes are not supported by daphne (https://github.com/django/daphne/issues/374). After looking around in the code I realized that this is implemented in the in this project.

Code: https://github.com/crossbario/autobahn-python/blob/master/autobahn/websocket/protocol.py#L2054

I am not sure why not all close codes are supported. Even the linked document in the code (https://www.iana.org/assignments/websocket/websocket.xml#close-code-number-rules) list all close codes.

Is there any reason why the close codes 1001-2999 are not supported? I think at least the defined codes 1000-1015 should be supported like described in the document.

I would create a MR, but the code look like this is intentional. :-)

Kind Regards
Sören

主要言語
Python
スター
2.5k
フォーク
766
平均マージ
3時間 25分
マージ済み PR(30日)
19

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

crossbario/autobahn-python のほかの issue

crossbario/autobahn-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。