-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.
Description
The HTTPS client created via require('https').request()
should reuse TLS sessions by default.
Sample code:
var sessions = [];
get(function() {
get(function() {
require('assert').equal(sessions[0].toString('hex'), sessions[1].toString('hex'));
console.log('PASS');
});
});
function get(cb) {
return new Promise(function(resolve, reject) {
require('https').request(
{ host: 'github.com', headers: { connection: 'close' } },
function(res) {
sessions.push(res.connection.getSession());
res.resume();
res.on('end', cb);
})
.end();
})
}
/cc @indutny
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.httpsIssues or PRs related to the https subsystem.Issues or PRs related to the https subsystem.