-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Fabian Kürten opened SPR-17459 and commented
For the class org.springframework.http.MediaType
Parsing a list of media types fails if a media type contains a comma ",".
For example this fails with InvalidMediaTypeException:
MediaType.parseMediaTypes("foo/bar;param=\",\"");
While the comma is the separator for different media types in a header my understanding is that it is legal to use tspecial
characters (like comma) inside a quoted string.
However the implementation of parseMediaTypes
tokenizes blindly by comma, ignoring quotes. The resulting parts are invalid media types (ends with an open quote) which leads to the exception.
Affects: 5.0.4, 5.1.2
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement