-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore empty entries when parsing MediaTypes and MimeTypes
Prior to Spring Framework 5.1.3, MimeTypeUtils.parseMimeTypes() and MediaType.parseMediaTypes() ignored empty entries, but 5.1.3 introduced a regression in that an empty entry -- for example, due to a trailing comma in the list of media types in an HTTP Accept header -- would result in a "406 Not Acceptable" response status. This commit fixes this by filtering out empty entries before parsing them into MimeType and MediaType instances. Empty entries are therefore effectively ignored. Fixes gh-23241
- Loading branch information
Showing
4 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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