Closed as not planned
Description
In applications that use RouterFunctions—for example, Spring Cloud Gateway MVC—a GET request with an invalid or wildcard Content-Type header (e.g., /) results in an: IllegalArgumentException
📍 This behavior originates from the following line in Spring Framework:
RouterFunctionMapping.java#L212
Unlike traditional Spring MVC applications—where Content-Type is primarily validated for POST, PUT, and PATCH requests—this validation occurs even for GET requests in the RouterFunctionMapping (there is no method based validation the exception is part of converting the servletRequest to ServerRequest.
This leads to an inconsistent experience and unexpected failures.