From 93b210aacb70a423d1722a63d3057e316ec893b1 Mon Sep 17 00:00:00 2001 From: Damien Grandi Date: Fri, 30 Aug 2024 16:09:43 +0200 Subject: [PATCH] Fix rare issue with digest auth --- src/HttpClient.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HttpClient.ts b/src/HttpClient.ts index 02cd4962..88525889 100644 --- a/src/HttpClient.ts +++ b/src/HttpClient.ts @@ -562,6 +562,8 @@ export class HttpClient extends EventEmitter { // FIXME: merge exists cookie header requestOptions.headers.cookie = response.headers['set-cookie'].join(';'); } + // Ensure the previous response is consumed as we re-use the same variable + await response.body.arrayBuffer(); response = await undiciRequest(requestUrl, requestOptions as UndiciRequestOption); } }