From 89e90bfd7411cefd1c25da88b59e80069a17a78b Mon Sep 17 00:00:00 2001 From: Alma <113595328+almarzn@users.noreply.github.com> Date: Tue, 23 Jul 2024 02:35:33 +0200 Subject: [PATCH] fix(qBittorrent): Add torrent files without authentication (#768) authCookie resolves to undefined when used without authentication. This lead to axios throwing ERR_HTTP_INVALID_HEADER_VALUE. Fixed to use the same method getRequestHeaders instead of the direct this.authCookie call, so it does not try to send the request with Cookie: undefined header. --- server/services/qBittorrent/clientRequestManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/services/qBittorrent/clientRequestManager.ts b/server/services/qBittorrent/clientRequestManager.ts index 9e8d6100d..df44b1886 100644 --- a/server/services/qBittorrent/clientRequestManager.ts +++ b/server/services/qBittorrent/clientRequestManager.ts @@ -422,7 +422,7 @@ class ClientRequestManager { }); const headers = form.getHeaders({ - Cookie: await this.authCookie, + ...(await this.getRequestHeaders()), 'Content-Length': form.getLengthSync(), });