-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
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:
- master:
Line 105 in 24bd014
params.put("charset", getCharset().name()); - 5.x.x:
Line 234 in ec9de94
params.put("charset", getCharset().name()); - < 5.x implementations work differently, I haven't taken time to verify.
I'd like to hear concerns - is removing charset for multipart requests appropriate?