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.
This commit is contained in:
Alma
2024-07-23 02:35:33 +02:00
committed by GitHub
parent 77339cce1a
commit 89e90bfd74
@@ -422,7 +422,7 @@ class ClientRequestManager {
});
const headers = form.getHeaders({
Cookie: await this.authCookie,
...(await this.getRequestHeaders()),
'Content-Length': form.getLengthSync(),
});