Accept header ends with "," produces HTTP "406 Not Acceptable" #17437
Labels
for: external-project
For an external project and not something we can fix
status: invalid
An issue that we don't feel is valid
Spring version: 5.1.8.RELEASE
Send a http request with header like this, containing
,
at the end.Accept: application/json,
HeaderContentNegotiationStrategy will produce a HttpMediaTypeNotAcceptableException exception.
That http request works before 5.1.2.RELEASE.
Maybe cause of this parsing method refactor in this commit f4b05dc
StringUtils.tokenizeToStringArray(mimeTypes, ",")
will strim tokens and ignore empty tokens by default, but now, the replacement method not support that anymore.The text was updated successfully, but these errors were encountered: