falconry / falconry/python-mimeparse

Convert types and subtypes to lowercase

未關閉 適合新手
#55 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
20
分支
12
PR 合併指標
30 天內沒有已合併 PR

描述

[Section 8.3.1 of RFC 9110](https://httpwg.org/specs/rfc9110.html#media.type) defines media types in the context of HTTP. It says:

> The type and subtype tokens are case-insensitive.

[Section 5.6.6 of RFC 9110](https://httpwg.org/specs/rfc9110.html#parameter) defines parameters for media types. It says:

> Parameter names are case-insensitive. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name.

At the moment, `python-mimeparse` converts all parameter names to lowercase, but it does not change the capitalization of types and subtypes. It would be more consistent if `python-mimeparse` also converted types and subtypes to all lowercase. Doing so would also help programs that use `python-mimeparse` comply with the “The type and subtype tokens are case-insensitive” rule.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先定位 python-mimeparse 中將參數名稱轉換為小寫的解析路徑,然後將其對類型和子類型 token 的處理與 RFC 9110 Sections 8.3.1 and 5.6.6 進行比較。當類型和子類型 token 被正規化為小寫,同時參數值保留其定義的大小寫行為時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。