Convert types and subtypes to lowercase

Open Beginner friendly
#55 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Start by locating the parsing path in python-mimeparse that lowercases parameter names, then compare its handling of type and subtype tokens with RFC 9110 Sections 8.3.1 and 5.6.6. Done means type and subtype tokens are normalized to lowercase while parameter values retain their defined case behavior.

Written by the indexing model from the issue text.

Description

Section 8.3.1 of RFC 9110 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 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.

Dominant language
Python
Stars
20
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from falconry/python-mimeparse

All issues in falconry/python-mimeparse

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.