Skip to content

Commit

Permalink
fix: uncaught exception due to second response with digest auth
Browse files Browse the repository at this point in the history
pick from #530
  • Loading branch information
damiengrandi authored and fengmk2 committed Sep 14, 2024
1 parent 43e6361 commit 802dd96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,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);
}
}
Expand Down

0 comments on commit 802dd96

Please sign in to comment.