From 8f13470af06045857f32496f03e77b14f3ecff98 Mon Sep 17 00:00:00 2001 From: liangwu Date: Thu, 31 Mar 2022 14:08:22 +0800 Subject: [PATCH] fix: chromium downloading hung at 99% (#8169) set keep-alive header to fix downloading done without 'finish' event trigged on some devices. --- src/node/BrowserFetcher.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/BrowserFetcher.ts b/src/node/BrowserFetcher.ts index 01140df4c487b..d7a41f049366f 100644 --- a/src/node/BrowserFetcher.ts +++ b/src/node/BrowserFetcher.ts @@ -571,11 +571,15 @@ function httpRequest( method?: string; agent?: HttpsProxyAgent; rejectUnauthorized?: boolean; + headers?: http.OutgoingHttpHeaders | undefined; }; let options: Options = { ...urlParsed, method, + headers: { + Connection: 'keep-alive', + }, }; const proxyURL = getProxyForUrl(url);