Skip to content

Commit

Permalink
fix: chromium downloading hung at 99%
Browse files Browse the repository at this point in the history
set keep-alive header to fix downloading done without 'finish' event trigged on some devices.
  • Loading branch information
0xGaryWu authored and OrKoN committed Mar 30, 2022
1 parent 40f1fa7 commit e3a4bb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/node/BrowserFetcher.ts
Expand Up @@ -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);
Expand Down

0 comments on commit e3a4bb0

Please sign in to comment.