Skip to content

fix(integrations/dav-server): improve WebDAV handling#7882

Open
ngg wants to merge 1 commit into
apache:mainfrom
ngg:webdav-fixes
Open

fix(integrations/dav-server): improve WebDAV handling#7882
ngg wants to merge 1 commit into
apache:mainfrom
ngg:webdav-fixes

Conversation

@ngg

@ngg ngg commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Fixes #7881.

Rationale for this change

What changes are included in this PR?

Normalize DavPath values before using them for comparisons against OpenDAL paths. OpenDAL normalizes operation paths internally, so the DAV integration compares paths in that same form when checking lister output and collection moves.

Use directory-shaped paths for collection metadata, listing, creation, and deletion. Slashless collection requests now fall back to trailing slash paths.

Support moving empty collections by creating the destination collection and deleting the source after a limited listing confirms the source is empty. This is needed so Windows Explorer can create a folder by renaming the initial New folder collection. Directory copies and non-empty directory moves still return NotImplemented.

Gate DAV append requests on write_can_append. Honor create_new by using if-not-exists only when write_with_if_not_exists is advertised. Map more OpenDAL errors to WebDAV errors, including Unsupported, path-type errors, and conditional conflicts.

Are there any user-facing changes?

WebDAV integration works better.

AI Usage Statement

I used Codex with GPT-5.5 to help draft and refine the change. I manually reviewed the generated code and tested the resulting behavior from Windows Explorer against a WebDAV path backed by OpenDAL.

Normalize DavPath values before using them for comparisons against
OpenDAL paths. OpenDAL normalizes operation paths internally, so the DAV
integration compares paths in that same form when checking lister output
and collection moves.

Use directory-shaped paths for collection metadata, listing, creation, and
deletion. Slashless collection requests now fall back to trailing slash
paths.

Support moving empty collections by creating the destination collection and
deleting the source after a limited listing confirms the source is empty.
This is needed so Windows Explorer can create a folder by renaming the
initial New folder collection. Directory copies and non-empty directory
moves still return NotImplemented.

Gate DAV append requests on write_can_append. Honor create_new by using
if-not-exists only when write_with_if_not_exists is advertised. Map more
OpenDAL errors to WebDAV errors, including Unsupported, path-type errors,
and conditional conflicts.

Fixes apache#7881
@ngg ngg requested review from Xuanwo and tisonkun as code owners July 7, 2026 18:37
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/fix The PR fixes a bug or has a title that begins with "fix" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: dav-server integration mishandles WebDAV folder operations

1 participant