Skip to content

fix(offline_download): fix login failure caused by qBittorrent 5.2.0 returning HTTP 204 No Content on successful authentication#2476

Merged
j2rong4cn merged 2 commits into
OpenListTeam:mainfrom
yuanczx:fix/qbit-login
May 18, 2026
Merged

fix(offline_download): fix login failure caused by qBittorrent 5.2.0 returning HTTP 204 No Content on successful authentication#2476
j2rong4cn merged 2 commits into
OpenListTeam:mainfrom
yuanczx:fix/qbit-login

Conversation

@yuanczx
Copy link
Copy Markdown
Contributor

@yuanczx yuanczx commented May 15, 2026

fix(offline_download): fix login failure caused by qBittorrent 5.2.0 returning HTTP 204 No Content on successful authentication

Description / 描述

Fix qBittorrent login failure when using version 5.2.0 or later.

Starting from qBittorrent 5.2.0, the WebUI login API returns 204 No Content on successful authentication instead of 200 OK with "Ok" response body. This causes the current client implementation to fail with an EOF error when reading the empty response body.

Motivation and Context / 背景

The current qBittorrent client implementation expects login success to return status code 200 with "Ok" response body. However, qBittorrent 5.2.0 returns 204 No Content with an empty body, causing:

  • EOF error when reading empty response body
  • Failed to initialize qBittorrent offline download tool

How Has This Been Tested? / 测试

  • qBittorrent 5.1.4: ✅ Login success (200 OK)
  • qBittorrent 5.2.0: ✅ Login success (204 No Content)

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

…returning HTTP 204 No Content on successful authentication
Copy link
Copy Markdown
Contributor Author

@yuanczx yuanczx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qBittorrent 5.2.0 now returns 204 No Content when when response contains no data, so we should also treat 204 as a successful response here.

Ref: WebAPI changelog

@xrgzs
Copy link
Copy Markdown
Member

xrgzs commented May 16, 2026

Related: #2248

Copy link
Copy Markdown
Member

@xrgzs xrgzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@j2rong4cn j2rong4cn merged commit 31b41f9 into OpenListTeam:main May 18, 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.

3 participants