Skip to content

Allow DispatcherServlet/ServletWrappingController to work with the extended WebDAV methods [SPR-4799] #9476

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits 3d87718

2 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions