Spring Boot version 2.6.2
Curl command:
curl localhost:8080/headers -H "Content-type:\*/\*"
Inside /headers
method endpoint, when using ServletServerHttpRequest getHeaders()
method produce the following result.
Actual result: java.lang.IllegalArgumentException: Content-Type cannot contain wildcard type '*'
Expected result: Exception should be ignored like what the comment say in the source code.
// Ignore: simply not exposing an invalid content type in HttpHeaders...
We cannot prevent someone out there to not craft this kind of curl command request.