Attempt to close with local-only codes (e.g. 1006) results in normal close (1000)
还没有人认领这个 Issue。
评估
- 难度
- 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
- 派生
- 57
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-hyper/wsproto 的其他 Issue
-
Compression 未关闭
难度 5/5 一周以上 新手友好度 25/100
python-hyper/wsproto#199 · 5 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 48/100
python-hyper/wsproto#173 · 1 条评论 ·
查看 python-hyper/wsproto 的全部 Issue
相似的 Issue
-
🐛 Bug 🔔 Pending processing
难度 2/5 1-3 小时 新手友好度 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
难度 2/5 1-3 小时 新手友好度 88/100
OpenHands/extensions#626 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
CSCfi/sd-search-api#39 ·