Open
Description
Version
v15.10.0
Platform
Darwin Lis-iMac.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
Subsystem
macos catalina 10.15.7
What steps will reproduce the bug?
const https = require('https');
async function main() {
const options = {
hostname: 'www.dhgate.com',
port: 443,
path: '/product/magnetic-liquid-eyeliner-magnetic-false-eyelashes/481362313.html',
method: 'GET',
headers: {
accept:
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'accept-language': 'en',
'user-agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36',
},
};
const req = https.request(options, (res) => {
console.log('statusCode:', res.statusCode);
console.log('headers:', res.headers);
res.on('data', (d) => {
process.stdout.write(d);
});
});
req.on('error', (e) => {
console.error(e);
});
req.end();
}
main();
How often does it reproduce? Is there a required condition?
No matter what system it will happen
What is the expected behavior?
receive the information returned by the server normally
What do you see instead?
hang forever
Additional information
I have tried many versions of nodejs, but none of them are normal.