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
Commit ccd17d introduced a regression where a custom HTTP method
would no longer match for an empty @RequestMapping condition.
The previous behavior should now be restored. Effectively
RequestMethodRequestCondition as before will now match to any HTTP
method (even unknown/custom ones) if the methods condition is empty.
The only exception is HTTP OPTIONS for which we provide default
handling as a fallback (i.e. when not mapped explicitly).
Issue: SPR-13130
Copy file name to clipboardExpand all lines: spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestMethodsRequestCondition.java
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -94,25 +94,26 @@ public RequestMethodsRequestCondition combine(RequestMethodsRequestCondition oth
94
94
* Check if any of the HTTP request methods match the given request and
95
95
* return an instance that contains the matching HTTP request method only.
96
96
* @param request the current request
97
-
* @return the same instance if the condition is empty, a new condition with
98
-
* the matched request method, or {@code null} if no request methods match
97
+
* @return the same instance if the condition is empty (unless the request
98
+
* method is HTTP OPTIONS), a new condition with the matched request method,
99
+
* or {@code null} if there is no match or the condition is empty and the
Copy file name to clipboardExpand all lines: spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestMethodsRequestConditionTests.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -82,12 +82,13 @@ public void methodHeadNoMatch() throws Exception {
0 commit comments