PEP 3333: URL-decoding and routing
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- api, backend, documentation
研究方向
首先閱讀 PEP 3333 和連結的 Starlette 討論,然後將其中描述的路由行為與 RFC 3986 第 2.2 和 2.4 節進行比較。當專案就應如何處理百分比編碼的路徑元件達成明確共識後,工作即告完成。
由索引模型根據 Issue 內容生成。
描述
There have been several discussions over the years about how WSGI frameworks apply routing in the case of URL-encoded path components. Here's a comment that links to a few of the discussions:
https://github.com/encode/starlette/pull/1828#issuecomment-1434043248
The issue is that when using routing features, the URL /user/foo/edit appears to be indistinguishable from /user/foo%2Fedit, and in case of routing rules for /user/{username} and /user/{username}/edit, the URL /user/foo%2Fedit will match the second rule and not the first.
This seems to me to be in conflict with RFC 3986 section 2.4 and RFC 3986 section 2.2. The latter states:
URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent.
But the routing mechanism in popular WSGI frameworks such as Flask and FastAPI are unable to differentiate the mentioned URLs, because the URI's percent-encoding is decoded before the routing happens.
I believe PEP-3333 needs to clarify the correct behaviour.
- 主要語言
- reStructuredText
- 星號
- 5k
- 分支
- 1.8k
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 25
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python/peps 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
New PEP Editors? 未關閉meta
難度 5/5 一週以上 新手友好度 25/100
-
infra
難度 3/5 1-2 天 新手友好度 55/100
-
難度 2/5 1-3 小時 新手友好度 48/100
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
avniproject/avni-client#2135 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 88/100
-
good first issue refactor
難度 2/5 1-3 小時 新手友好度 72/100