falconry / falconry/python-mimeparse

Convert types and subtypes to lowercase

Offen
#55 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
20
Forks
12
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

[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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.