From fb72d2e1c24cd4660fd6611ef723c5827c47294c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 7 Sep 2021 15:16:26 +0200 Subject: Fix infohash with object storage --- shared/extra-utils/requests/requests.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/requests') diff --git a/shared/extra-utils/requests/requests.ts b/shared/extra-utils/requests/requests.ts index 60a08b13c..5bbf7f3bf 100644 --- a/shared/extra-utils/requests/requests.ts +++ b/shared/extra-utils/requests/requests.ts @@ -29,9 +29,12 @@ function makeRawRequest (url: string, expectedStatus?: HttpStatusCode, range?: s function makeGetRequest (options: CommonRequestParams & { query?: any + rawQuery?: string }) { const req = request(options.url).get(options.path) - .query(options.query) + + if (options.query) req.query(options.query) + if (options.rawQuery) req.query(options.rawQuery) return buildRequest(req, { contentType: 'application/json', expectedStatus: HttpStatusCode.BAD_REQUEST_400, ...options }) } -- cgit v1.2.3