Skip to content

Commit 88fdfb7

Browse files
committed
Fix original http headers modified since auth header construct #682
1 parent 03ae9a9 commit 88fdfb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils/httpClient.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ export class HttpClient {
115115
}
116116
}
117117

118+
// Fix #682 Do not touch original headers in httpRequest, which may be used for retry later
119+
// Simply do a shadow copy here
120+
const clonedHeaders = Object.assign({}, httpRequest.headers);
118121
const options: got.GotBodyOptions<null> = {
119-
headers: httpRequest.headers,
122+
headers: clonedHeaders,
120123
method: httpRequest.method,
121124
body: requestBody,
122125
encoding: null,

0 commit comments

Comments
 (0)