Skip to content

fix: 适配 qBittorrent 5.2.0 WebAPI 返回 204 的变更#109

Merged
vertex-app merged 1 commit into
vertex-app:stablefrom
avesed:fix/qbittorrent-5.2.0
May 26, 2026
Merged

fix: 适配 qBittorrent 5.2.0 WebAPI 返回 204 的变更#109
vertex-app merged 1 commit into
vertex-app:stablefrom
avesed:fix/qbittorrent-5.2.0

Conversation

@avesed
Copy link
Copy Markdown
Contributor

@avesed avesed commented May 19, 2026

qBittorrent 5.2.0 changelog: "WEBAPI: Send 204 when WebAPI response contains no data"。 登录与加种成功的响应不再是 200 + "Ok." 而是 204 No Content,原有的
res.body.indexOf("Ok") 与 statusCode !== 200 校验会把成功误判为失败, 导致下载器连接失败 (Issue #108)。

  • qb.js: 登录同时接受 204 与旧版 200 + "Ok." 两种成功形式, 并对 set-cookie 缺失情况加保护。
  • Client.js: addTorrent / addTorrentByTorrentFile 的 statusCode 校验 追加 204 为成功。

其余仍返回 JSON 数据的端点 (getMaindata / getTrackerList 等) 不受 5.2.0 影响,未做修改;旧版 qBittorrent 行为保持兼容。

qBittorrent 5.2.0 changelog: "WEBAPI: Send 204 when WebAPI response contains no data"。
登录与加种成功的响应不再是 200 + "Ok." 而是 204 No Content,原有的
res.body.indexOf("Ok") 与 statusCode !== 200 校验会把成功误判为失败,
导致下载器连接失败 (Issue vertex-app#108)。

- qb.js: 登录同时接受 204 与旧版 200 + "Ok." 两种成功形式,
  并对 set-cookie 缺失情况加保护。
- Client.js: addTorrent / addTorrentByTorrentFile 的 statusCode 校验
  追加 204 为成功。

其余仍返回 JSON 数据的端点 (getMaindata / getTrackerList 等) 不受 5.2.0
影响,未做修改;旧版 qBittorrent 行为保持兼容。
@vertex-app vertex-app merged commit 742e9d3 into vertex-app:stable May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants