Skip to content

Commit

Permalink
Fix original http headers modified since auth header construct #682
Browse files Browse the repository at this point in the history
  • Loading branch information
Huachao committed Sep 23, 2020
1 parent 03ae9a9 commit 88fdfb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ export class HttpClient {
}
}

// Fix #682 Do not touch original headers in httpRequest, which may be used for retry later
// Simply do a shadow copy here
const clonedHeaders = Object.assign({}, httpRequest.headers);
const options: got.GotBodyOptions<null> = {
headers: httpRequest.headers,
headers: clonedHeaders,
method: httpRequest.method,
body: requestBody,
encoding: null,
Expand Down

0 comments on commit 88fdfb7

Please sign in to comment.