Attempt to close with local-only codes (e.g. 1006) results in normal close (1000)
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 38/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- networking
研究方向
Start at src/wsproto/frame_protocol.py lines 576-577 and trace how an attempted close with code 1006 is handled. Confirm the WebSocket protocol's expected behavior for local-only close codes, then define a regression test showing that 1006 is not converted into a normal 1000 closure.
由索引模型根據 Issue 內容生成。
描述
Currently, if you close a websocket with code 1006 (which is not allowed), the result is a 1000-code closure:
https://github.com/python-hyper/wsproto/blob/main/src/wsproto/frame_protocol.py#L576-L577
I suspect this should instead be either a 1002 error or an exception, but I'm not certain.
This resulted in a latent bug in hypercorn (an ASGI web server that uses wsproto) where websockets were closed with code 1000 on internal server errors:
https://github.com/pgjones/hypercorn/pull/112
- 主要語言
- Python
- 星號
- 303
- 分支
- 61
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python-hyper/wsproto 的其他 Issue
-
Compression未關閉
難度 5/5 一週以上 新手友好度 25/100
python-hyper/wsproto#199 · 5 則留言 ·
-
Type compatibility with `h11._headers.Header`可能已有人在做 @gyanu2507 於 56 天前認領。 未關閉
難度 1/5 1-3 小時 新手友好度 48/100
python-hyper/wsproto#173 · 1 則留言 ·
查看 python-hyper/wsproto 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
-
bug
難度 2/5 1-3 小時 新手友好度 77/100
AstrBotDevs/AstrBot#10720 ·
維護者通常 1 天內回覆
-
cause/upstream comp/cli P2 provider/other tool/file type/bug
難度 2/5 1-3 小時 新手友好度 78/100
NousResearch/hermes-agent#143900 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 85/100
WLAN-Pi/wlanpi-profiler#341 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆