-
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
Antonio Mota opened SPR-4799 and commented
The DispatcherServlet doesn't allow methods beside HTTP one's, thus disabling the use in WebDAV contexts. This can be corrected by override one method in DispatcherServlet, as discussed in http://forum.springframework.org/showthread.php?t=53472 :
protected void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, java.io.IOException {
try {
doService(req, resp);
} catch (Exception e) {
// TODO
}
}
Also, ServletWrappingController could have a constructor to allow the WebDAV methods to be forward to a WevDAV servlet:
public ServletWrappingController() {
String[] m = { "OPTIONS", "GET", "HEAD", "POST", "TRACE", "PROPFIND",
"PROPPATCH", "MKCOL", "COPY", "PUT", "DELETE", "MOVE", "LOCK",
"UNLOCK", "VERSION-CONTROL" };
setSupportedMethods(m);
}
or even better, issuing a OPTIONS to the wrapped servlet and setting the supported methods to it's result .
Issue Links:
- Regression: HttpEntityMethodProcessor does not allow other Http methods than defined in the HttpMethod Enum [SPR-13776] #18350 Regression: HttpEntityMethodProcessor does not allow other Http methods than defined in the HttpMethod Enum ("depends on")
- Add support for the HTTP PATCH method [SPR-7985] #12640 Add support for the HTTP PATCH method
- RequestMethodsRequestCondition fails on unsupported method types [SPR-9815] #14448 RequestMethodsRequestCondition fails on unsupported method types
Referenced from: commits 3d87718
2 votes, 5 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