Media type fails to match types with multiple '+' characters [SPR-15795] #20350
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
spring-projects-issues commentedJul 19, 2017
Ben Draut opened SPR-15795 and commented
The logic in
MimeType.includes
andMimeType.isCompatibleWith
appears to have a bug, in that they assume there will only be one+
character in the media type string.For example,
application/*+json
does notinclude
a media type of the formapplication/x.y+z+json
.My understanding from the RFC is that multiple + characters are allowed, and everything following the last + defines the syntax suffix.
The code in
MimeType
is using ```indexOf('+')
org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type...
Referenced from: pull request #1481, and commits d7a7b08
The text was updated successfully, but these errors were encountered: