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 .
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 :
Also, ServletWrappingController could have a constructor to allow the WebDAV methods to be forward to a WevDAV servlet:
or even better, issuing a OPTIONS to the wrapped servlet and setting the supported methods to it's result .
Issue Links:
Referenced from: commits 3d87718
2 votes, 5 watchers