Bug 40084 - WebdavResource.mkcolMethod() does not propagate "followRedirects".
Summary: WebdavResource.mkcolMethod() does not propagate "followRedirects".
Status: RESOLVED FIXED
Alias: None
Product: Slide
Classification: Unclassified
Component: WebDAV client (show other bugs)
Version: 2.1
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Slide Developer List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-20 15:59 UTC by Jeremy Norris
Modified: 2006-07-20 13:31 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Norris 2006-07-20 15:59:32 UTC
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);
Comment 1 Oliver Zeigermann 2006-07-20 20:31:48 UTC
Patch applied! Thanks!