-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Keith Donald opened SPR-7346 and commented
To reproduce:
- Checkout https://src.springsource.org/svn/spring-samples/mvc-showcase
- Deploy the application, view the root home page, and click "Mapping by not presence of header" link. You'll see "Mapped by regexp!", indicating the wrong
@Controllermethod was matched. The method that should have been matched was MappingController.byHeaderNegation. The method looks like:
@RequestMapping(value="/mapping/header", method=RequestMethod.GET, headers="!Accept=text/plain")
public @ResponseBody String byHeaderNegation() {
return "Mapped by path + method + header with negation!";
}
You can confirm using Firebug that the request information contains what should be required to match ("text/plain" is not an Accept value and the resource URL and HTTP method is correct).
Affects: 3.0.3
Attachments:
- ServletAnnotationMappingUtilsTest.java (8.18 kB)
- ServletAnnotationMappingUtilsTest.java (6.59 kB)
- SPR7346.patch (927 bytes)
Referenced from: commits f8425a5
4 votes, 2 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement