mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
webui fails to parse any and all headers on gentoo musl/llvm host #17460
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#17460
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SuspiciousDuck on GitHub (Jan 20, 2026).
qBittorrent & operating system versions
qBittorrent: >5.0.5 including latest git
Operating System: Gentoo (musl/llvm profile)
Qt: 6.10.1
libtorrent-rasterbar: 2.0.10
What is the problem?
When using a qBittorrent version higher than 5.0.5 with a webui, all requests made to the webui endpoint fail with code 400, including empty requests. The stdout/stderr log (not qBittorrent.log) only has the following message:
Steps to reproduce
Additional context
No response
Log(s) & preferences file(s)
sensitive data has been replaced with "censored", and in some areas I have omitted text.
qbittorrent.log
qBittorrent.conf
@vafada commented on GitHub (Jan 21, 2026):
can you paste
curllogs of the actual request? including http headers.@SuspiciousDuck commented on GitHub (Jan 21, 2026):
@vafada commented on GitHub (Jan 21, 2026):
Header look good:
Not sure what going on then. On my local, I get a valid response (200):
@LookLotsOfPeople commented on GitHub (Jan 26, 2026):
Is this tested with a LLVM/musl-based build or just a replication on a non-musl machine? I'm in the same bucket of facing this bug after upgrading from qBittorrent 5.0.5 to 5.1.2 as well as from QT 6.9.X to 6.10.1 back in November. Luckily my setup is non-essential so I've been holding off on reporting anything (either here or on the Gentoo bugs tracker) until version v5.2.0 is released (as it explicitly advertises QT 6.10 support).
Gentoo has since removed QT 6.9.X from it's main mirror repository, but if you think there might be value in it, I can try rebuilding 5.1.2 (or master) against QT 6.9.3 to see if it's a musl incompatibility with qBittorrent-nox 5.1 and QT 6.10.
@vafada commented on GitHub (Jan 26, 2026):
I have no idea. Just a regular Ubuntu distro "Ubuntu 24.04.2 LTS".
The OP is hitting this error:
github.com/qbittorrent/qBittorrent@b3ddcacda3/src/base/http/requestparser.cpp (L108)And that happens if the
parseStartLinesreturnsfalsegithub.com/qbittorrent/qBittorrent@b3ddcacda3/src/base/http/requestparser.cpp (L164-L201)Looking at the function, it will return
falseCRLFGET / HTTP/1.1<-- is validDebug that method to find the problem
@glassez commented on GitHub (Jan 26, 2026):
Is
GET / HTTP/1.1invalid?@vafada commented on GitHub (Jan 26, 2026):
GET / HTTP/1.1is valid@glassez commented on GitHub (Jan 26, 2026):
So why do you cite it as an example of the invalid one?
@LookLotsOfPeople commented on GitHub (Jan 26, 2026):
Here's what I found after following up on your lead. EOH is evaluating to an empty string (which seems to me more as a LLVM issue than a musl issue, but I could not find how to properly resolve the issue to figure out the cause).
CRLF.repeated(2)does properly evaluate during runtime, so it seems to be a compile-time issue.Changing this line to the following (i.e., manually conducting the inline operation) fixes the issue for my setup:
github.com/qbittorrent/qBittorrent@b3ddcacda3/src/base/http/requestparser.cpp (L54)@SuspiciousDuck would you be able to confirm if this also fixes it for your setup?
qBittorrent: 5.1.2
libtorrent-rasterbar: 2.0.10
QT: 6.10.1
LLVM: 21.1.8
Musl: 1.2.5
@SuspiciousDuck commented on GitHub (Jan 26, 2026):
@LookLotsOfPeople I patched qbittorrent-9999 to your change, and it builds and runs perfectly fine (so far). Thanks a lot for looking into this.