Handle 204 No Content response for qBittorrent login - #39
Open
Aractor wants to merge 1 commit into
Open
Conversation
Update login response handling for qBittorrent 5.2.0 to accept 204 No Content as a successful login.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
qBittorrent 5.2.0 changed /api/v2/auth/login to return "204 No Content" on success instead of"200 OK" with "Ok." in the body. This breaks login(), which only accepts the old 200+"Ok." response — so auth fails here even with correct credentials, even though qBittorrent actually logged in fine and set a valid session cookie.
Fix: Treat the 204 response as a successful login. Existing 200/"Ok." check is untouched, ensuring older qBittorrent versions are unaffected.
This same qBittorrent 5.2.0 change has already caused the same auth failure in other projects — see Radarr (#11339), Whisparr (#1082), and Homepage (discussion #6650).
I tested locally against qBittorrent 5.2.x (login + GetXfers work) and an older qBittorrent version (no change in behavior) to confirm functionality.