Skip to content

Non-compliant Content-Type header for multipart media types #25885

Closed
@rcgardne

Description

@rcgardne

Affects: 5.x

The org.springframework.http.codec.multipart package contains various methods for building a Content-Type header for multipart media types. The default method produces a header with the following format:

"multipart/{sub-type};boundary={boundary};charset={charset|UTF-8}"

However, RFC7578 specifies only a required parameter of boundary and optional parameters as none. Hence, the addition of a charset parameter is not strictly in accordance with RCF7578. Robust server implementations should ignore this parameter, but some do not (in my case, civetweb), causing request failures. Here are the relevant framework versions and code locations causing the problems:

I'd like to hear concerns - is removing charset for multipart requests appropriate?

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions