-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed as not planned
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
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.
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply