mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: chromium downloading hung at 99% (#8169)
set keep-alive header to fix downloading done without 'finish' event trigged on some devices.
This commit is contained in:
parent
40f1fa7ab4
commit
8f13470af0
@ -571,11 +571,15 @@ function httpRequest(
|
|||||||
method?: string;
|
method?: string;
|
||||||
agent?: HttpsProxyAgent;
|
agent?: HttpsProxyAgent;
|
||||||
rejectUnauthorized?: boolean;
|
rejectUnauthorized?: boolean;
|
||||||
|
headers?: http.OutgoingHttpHeaders | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
let options: Options = {
|
let options: Options = {
|
||||||
...urlParsed,
|
...urlParsed,
|
||||||
method,
|
method,
|
||||||
|
headers: {
|
||||||
|
Connection: 'keep-alive',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const proxyURL = getProxyForUrl(url);
|
const proxyURL = getProxyForUrl(url);
|
||||||
|
Loading…
Reference in New Issue
Block a user