summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-09 11:47:35 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-09 11:47:35 -0400
commit407ea00ce11c145b73a4be6bd4e1354931b4d500 (patch)
tree99519e7a99ceca880de1a8266e7bea2f6e4b7724
parent726684a65cc08ab356a53e4157ef28c36ab9a25b (diff)
WebDAV: Set depth 1 in PROPFIND request, for better compatability with some servers. Thanks, wzhd.
-rw-r--r--Remote/WebDAV.hs5
-rw-r--r--debian/changelog2
2 files changed, 6 insertions, 1 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index 35af290ad..87df16e93 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -260,7 +260,10 @@ existsDAV :: DavLocation -> DAVT IO (Either String Bool)
existsDAV l = inLocation l check `catchNonAsync` (\e -> return (Left $ show e))
where
check = do
- setDepth Nothing
+ -- Some DAV services only support depth of 1, and
+ -- more depth is certainly not needed to check if a
+ -- location exists.
+ setDepth (Just Depth1)
catchJust
(matchStatusCodeException (== notFound404))
(getPropsM >> ispresent True)
diff --git a/debian/changelog b/debian/changelog
index c6eb05287..6340888cd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,8 @@ git-annex (6.20160127) UNRELEASED; urgency=medium
* init: Fix bugs in submodule .git symlink fixup, that occurred when
initializing in a subdirectory of a submodule and a submodule of a
submodule.
+ * WebDAV: Set depth 1 in PROPFIND request, for better compatability with
+ some servers. Thanks, wzhd.
-- Joey Hess <id@joeyh.name> Thu, 28 Jan 2016 13:53:09 -0400