Skip to content

Commit 162cf78

Browse files
fix: uncaught exception due to second response with digest auth (#534)
pick from #530 Co-authored-by: Damien Grandi <[email protected]>
1 parent 43e6361 commit 162cf78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/HttpClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ export class HttpClient extends EventEmitter {
581581
// FIXME: merge exists cookie header
582582
requestOptions.headers.cookie = response.headers['set-cookie'].join(';');
583583
}
584+
// Ensure the previous response is consumed as we re-use the same variable
585+
await response.body.arrayBuffer();
584586
response = await undiciRequest(requestUrl, requestOptions as UndiciRequestOption);
585587
}
586588
}

0 commit comments

Comments
 (0)