Skip to content

fix(server/webdav): improve error handling for PROPFIND#2066

Draft
xrgzs wants to merge 1 commit into
OpenListTeam:mainfrom
xrgzs:fix/webdav-propfind-error
Draft

fix(server/webdav): improve error handling for PROPFIND#2066
xrgzs wants to merge 1 commit into
OpenListTeam:mainfrom
xrgzs:fix/webdav-propfind-error

Conversation

@xrgzs

@xrgzs xrgzs commented Feb 1, 2026

Copy link
Copy Markdown
Member

Summary / 摘要

PROPFIND 遇到文件系统错误时返回错误,避免返回空文件夹。

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:
  • OpenList-Docs:

Testing / 测试

  • go test ./server/webdav
  • Manual test / 手动测试: 修改前,使用 rclone 同步时,如果源存储出错,会返回空文件夹,被 rclone 判断为目标文件不存在,导致反复上传,修改后能够被正确视为错误并在程序内部自动进行指数退避处理。

TODO:

需要确定:

  • 是否影响 HTTP 207 Multi-Status是否会影响其它客户端
    已知问题:返回空文件夹在部分软件中不会报错,返回错误会弹窗,但个人认为错误弹窗是正确的表现

  • 错误代码返回 500 还是 405

  • 对齐 golang.org/x/net/webdav 的 handlePropfindError

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmtgo fmtprettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

@xrgzs xrgzs added bug Module: Server API and protocol changes labels Feb 1, 2026
@Suyunmeng Suyunmeng force-pushed the main branch 4 times, most recently from a31fd53 to 7bea29c Compare April 2, 2026 17:27
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs force-pushed the fix/webdav-propfind-error branch from 9f3fbb6 to ca65b47 Compare June 18, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Module: Server API and protocol changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant