阿里云盘 WebDAV 服务
### 问题描述 有许多类似 issue 提到过 429 相关的问题,比如 #121 和 #805,但是并没有从根本上解决问题。 通过 WebDAV 列出目录时整个目录都在一个请求里返回,对应向阿里云盘发出的多个 HTTP 请求,所以客户端无法做 rate limit,只能靠 `aliyundrive-webdav` 自己限制。然而目前 `aliyundrive-webdav` 仅进行 3 次重试,且重试间隔极短(如所附日志所示)。另外重试的次数和间隔也均为 hard-coded,无法通过命令行调整: https://github.com/messense/aliyundrive-webdav/blob/24925dd37c766d3f845afb6f6601583d0c1d5eb7/src/drive/mod.rs#L83-L86 希望能做出以下改进: - 添加命令行选项,比如 `--retries` 和 `--retries-interval` - 增加 rate limit 机制,可以尝试[这个库](https://github.com/xDarksome/reqwest-ratelimit),或参考[这个 issue](https://github.com/seanmonstar/reqwest/issues/491) - 识别[阿里云盘返回的 header](https://www.yuque.com/aliyundrive/zpfszx/zscu11#:~:text=%E6%98%AF%E8%A7%A6%E5%8F%91%E9%99%90%E5%88%B6,%E6%89%8D%E8%83%BD%E7%BB%A7%E7%BB%AD%E8%AF%B7%E6%B1%82) 以调整重试时间 ### 重现步骤 1. 启动 `aliyundrive-webdav` 2. 用任意 WebDAV 客户端尝试列出一个大目录 ### 版本 2.3.3 ### 运行平台 Windows ### 日志 ``` [...] WARN reqwest_retry::middleware: Retry attempt #0. Sleeping 128.045104ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #1. Sleeping 110.082827ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #2. Sleeping 677.208296ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #0. Sleeping 145.568725ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #0. Sleeping 241.640289ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #0. Sleeping 195.823185ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #2. Sleeping 786.743604ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #1. Sleeping 374.866109ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #1. Sleeping 513.848439ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #0. Sleeping 199.09798ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #0. Sleeping 37.960208ms before the next attempt WARN reqwest_retry::middleware: Retry attempt #2. Sleeping 192.46117ms before the next attempt ERROR aliyundrive_webdav::vfs: list_files_and_cache failed path=[REDACTED] error=HTTP status client error (429 Too Many Requests) for url (https://openapi.aliyundrive.com/adrive/v1.0/openFile/list) ERROR dav_server::handle_props: read_dir error GeneralFailure [...] ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by shniubobo and has received 0 comments.