Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

webdav: add "Depth: 0" to GET requests to fix bitrix

Nick Craig-Wooda854cb96172d
diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go
index 6f1238e3b..e441b06a5 100644
--- a/backend/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -1133,6 +1133,9 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
Method: "GET",
Path: o.filePath(),
Options: options,
+ ExtraHeaders: map[string]string{
+ "Depth": "0",
+ },
}
err = o.fs.pacer.Call(func() (bool, error) {
resp, err = o.fs.srv.Call(ctx, &opts)