mkcolMethod returns a 301 (Moved Permanently) if there is no trailing slash (tested with Apache 2.2.2 mod_dav) on the directory provided. However, WebdavResource.mkcolMethod() does not propagate "followRedirects" so that this 301 is handled. The following simple patch fixes the issue: ----- Index: clientlib/src/java/org/apache/webdav/lib/WebdavResource.java =================================================================== --- clientlib/src/java/org/apache/webdav/lib/WebdavResource.java (revision 423268) +++ clientlib/src/java/org/apache/webdav/lib/WebdavResource.java (working copy) @@ -4156,6 +4156,7 @@ setClient(); MkcolMethod method = new MkcolMethod(URIUtil.encodePath(path)); + method.setFollowRedirects(this.followRedirects); generateIfHeader(method); generateTransactionHeader(method);
Patch applied! Thanks!