-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
- Version: 15.12.0
- Platform: 5.8.0-45-generic Nominating Chris Dickinson to the TC #51-Ubuntu SMP Fri Feb 19 13:24:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: https, ws, http
What steps will reproduce the bug?
- Use the https library and bind an IPv6 localaddress
How often does it reproduce? Is there a required condition?
Can be reproduced with the usage of any IPv6 address in the interface
What is the expected behavior?
I am supposed to be able to make the request without any problems just like when binding an IPv4
What do you see instead?
bind EINVAL error
Additional information
I have tested with multiple IPv4 addresses in the interface and they all worked but non of the IPv6 are working
This is the code:
`const https = require('https');
(async () => {
const options = {
//Not real site
hostname: 'example.com',
path: '/test',
localAddress:'Ipv6 address'
}
https.get(options,(res) => {
let body = "";
res.on("data", (chunk) => {
body += chunk;
});
res.on("end", () => {
try {
let json = JSON.parse(body);
console.log(json)
// do something with JSON
} catch (error) {
console.error(error.message);
};
});
}).on("error", (error) => {
console.error(error.message);
});
})();`
Metadata
Metadata
Assignees
Labels
No labels