zhanghai / zhanghai/MaterialFiles

WebDav DELETE request for directories is missing trailing slash

Open
#1,475 0 comments 0 reactions 1 assignee View on GitHub

@zhanghai is already working on this.

Since Sep 19, 2025.

bug
Dominant language
Kotlin
Stars
9k
Forks
736
PR merge metrics
No merged PRs in 30d

Description

The nginx WebDav server requires a trailing slash for DELETE requests on paths, but MaterialFiles is not sending it.

According to the WebDAV RFC, section 5.2:

In general, clients SHOULD use the trailing slash form of collection names.

I know it doesn't say "MUST", but it says "SHOULD", but still Nginx requires the trailing slash in this case. Otherwise it errors with status 409. Nginx doesn't seem willing to change this behaviour, see this related ticket: https://trac.nginx.org/nginx/ticket/1966

Would it be possible to have MaterialFiles send a trailing slash when DELETEing directories?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.