List OPTIONS in OPTIONS responses for @RequestMapping
Issue: SPR-16513
This commit is contained in:
@@ -172,8 +172,8 @@ public class RequestMappingInfoHandlerMappingTests {
|
||||
|
||||
@Test
|
||||
public void getHandlerHttpOptions() throws Exception {
|
||||
testHttpOptions("/foo", "GET,HEAD");
|
||||
testHttpOptions("/person/1", "PUT");
|
||||
testHttpOptions("/foo", "GET,HEAD,OPTIONS");
|
||||
testHttpOptions("/person/1", "PUT,OPTIONS");
|
||||
testHttpOptions("/persons", "GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS");
|
||||
testHttpOptions("/something", "PUT,POST");
|
||||
}
|
||||
|
||||
@@ -1776,7 +1776,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
|
||||
getServlet().service(request, response);
|
||||
|
||||
assertEquals(200, response.getStatus());
|
||||
assertEquals("GET,HEAD", response.getHeader("Allow"));
|
||||
assertEquals("GET,HEAD,OPTIONS", response.getHeader("Allow"));
|
||||
assertTrue(response.getContentAsByteArray().length == 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user