FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

util: make MIMEParams accessors case-insensitive by watilde · Pull Request #64123 · nodejs/node · GitHub

/ node Public

util: make MIMEParams accessors case-insensitive - #64123

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
watilde:fix/mime-params-case-insensitive
Jul 12, 2026
Merged

util: make MIMEParams accessors case-insensitive#64123
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
watilde:fix/mime-params-case-insensitive

Conversation

watilde commented Jun 25, 2026

Copy link
Copy Markdown
Member

MIME parameter names are case-insensitive and the parser already ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set() compared against the raw argument. As a result a parsed parameter was unreachable by the casing the caller used (e.g. params.get('Charset') returned null for "Charset=utf-8"), and set() could create duplicate, case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with the whatwg-mimetype reference implementation.

MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jun 25, 2026
watilde added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 27, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 27, 2026

Copy link
Copy Markdown
Collaborator

watilde added the review wanted PRs that need reviews. label Jun 29, 2026
watilde added commit-queue Add this label to land a pull request using GitHub Actions. and removed review wanted PRs that need reviews. labels Jul 6, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 12, 2026
nodejs-github-bot merged commit b4c7be3 into nodejs:main Jul 12, 2026
77 checks passed

Copy link
Copy Markdown
Collaborator

Landed in b4c7be3

aduh95 pushed a commit that referenced this pull request Jul 21, 2026
MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: #64123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: #64123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Jul 29, 2026
MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: #64123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 6, 2026
MIME parameter names are case-insensitive and the parser already
ASCII-lowercases them, but MIMEParams.get(), has(), delete() and set()
compared against the raw argument. As a result a parsed parameter was
unreachable by the casing the caller used (e.g. params.get('Charset')
returned null for "Charset=utf-8"), and set() could create duplicate,
case-colliding parameters.

Lowercase the name in the accessors to match the parser, consistent with
the whatwg-mimetype reference implementation.

Signed-off-by: Daijiro Wachi <daijiro.wachi@gmail.com>
PR-URL: #64123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL