falconry / falconry/python-mimeparse

Convert types and subtypes to lowercase

Open
#55 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20
Forks
12
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.