Skip to content

MimeType must use case insensitive comparisons for Charsets [SPR-13157] #17748

@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-13157 and commented

Status Quo

Spring's MimeType currently performs exact equality checks for "charset" values in its parameters field -- see org.springframework.util.MimeType.equals(Object).

As a result, the MIME types text/plain;charset=UTF-8 and text/plain;charset=utf-8 are incorrectly considered to be different, and this breaks the contract for Java's Charset:

Charset names are not case-sensitive; that is, case is always ignored when comparing charset names.

See also: failing build SPR-PUB-2539.

Related Resources


Affects: 4.0 GA

Issue Links:

Referenced from: commits 75fe618, 89e504c

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions