Skip to content

Commit

Permalink
fix: uncaught exception due to second response with digest auth (#534)
Browse files Browse the repository at this point in the history
pick from #530

Co-authored-by: Damien Grandi <damien.grandi@gmail.com>
  • Loading branch information
fengmk2 and damiengrandi authored Sep 14, 2024
1 parent 43e6361 commit 162cf78
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 162cf78

Please sign in to comment.