You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sbrannen
changed the title
ServletServerHttpRequest getHeaders() method throwing IllegalArgumentException instead of being ignored on an invalid content type */*.
ServletServerHttpRequest getHeaders() throws IllegalArgumentException instead of ignoring invalid content type */*
Jan 20, 2022
Spring Boot version 2.6.2
repo link
Curl command:
curl localhost:8080/headers -H "Content-type:\*/\*"
Inside
/headers
method endpoint, when usingServletServerHttpRequest 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.
The text was updated successfully, but these errors were encountered: