Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add valid v2 torrent file fails with 415 #50

Open
agcom opened this issue Nov 12, 2024 · 3 comments
Open

Add valid v2 torrent file fails with 415 #50

agcom opened this issue Nov 12, 2024 · 3 comments

Comments

@agcom
Copy link

agcom commented Nov 12, 2024

The torrent file in question is v2.zip (uploaded in a ZIP, because GitHub does not allow attaching .torrent files; extract to get v2.torrent). The torrent adds fine using the desktop qBittorrent application and the qBittorrent-nox deb installation (of the same version, v5.0.1); it only fails with the qBittorrent Docker.

Steps to reproduce

Run qBittorrent-nox:

docker container run --rm -it -p 8080:8080 -e QBT_LEGAL_NOTICE=confirm ghcr.io/qbittorrent/docker-qbittorrent-nox:5.0.1-1

Try to add the torrent though the web API (or web UI):

curl -X POST http://localhost:8080/api/v2/torrents/add -i -F torrents=@./v2.torrent

To avoid auth/authz error (403 forbidden), either allow localhost (or while-list the client's IP address), or pass-in user/password through the request.

Output:

HTTP/1.1 415 Unsupported Media Type
connection: keep-alive
content-length: 48
content-security-policy: default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; object-src 'none'; form-action 'self'; frame-ancestors 'self';
content-type: text/plain; charset=UTF-8
cross-origin-opener-policy: same-origin
date: Tue, 12 Nov 2024 13:32:01 GMT
referrer-policy: same-origin
set-cookie: SID=P7l91ZuF6pf4Vr8D4JBkt9piJgEIhh1y; HttpOnly; SameSite=Strict; path=/
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block

Error: 'v2.torrent' is not a valid torrent file.
@Chocobo1
Copy link
Member

The provided torrent is in bittorrent v2 format and currently docker-qbittorrent-nox is using libtorrent 1.2.x which doesn't support v2 format.
We plan to switch to libtorrent 2.x but it has some serious performance issue. In the mean time, you could consider running alpha version which is built with libtorrent 2.x.

@agcom
Copy link
Author

agcom commented Nov 15, 2024

... currently docker-qbittorrent-nox is using libtorrent 1.2.x ...
... you could consider running alpha version which is built with libtorrent 2.x ...

That's interesting. There is no mention of that information anywhere; one would assume that the Docker image distribution is the same as the Debian package distribution (for qBittorrent-nox).

I currently switched to a custom Docker image with Debian Trixie base (needed v5 qBittorrent-nox), and simply installed qBittorrent-nox through APT. I will try the alpha Docker image version too.

@Chocobo1
Copy link
Member

There is no mention of that information anywhere;

You can check the version numbers in WebUI menu: Help -> About -> Software Used.
It is not mentioned in repo README.md due to lazy maintenance.

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

No branches or pull requests

2 participants