-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Reuse TLS sessions in HTTPS client #1499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
feature request
Issues that request new features to be added to Node.js.
https
Issues or PRs related to the https subsystem.
Comments
Strangely enough, passing the result of 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' }, session: sessions[0] },
function(res) {
sessions.push(res.connection.getSession());
res.resume();
res.on('end', function() { cb(); });
})
.end();
})
} The first request passes, the second request fails with the following error:
io.js version 1.8.1. |
Add |
Fix is here: #2228 |
indutny
added a commit
to indutny/io.js
that referenced
this issue
Jul 27, 2015
Fix: nodejs#1499 PR-URL: nodejs#2228 Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
indutny
added a commit
that referenced
this issue
Jul 27, 2015
Fix: #1499 PR-URL: #2228 Reviewed-By: Shigeki Ohtsu <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
This was fixed in 2ca5a3d. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature request
Issues that request new features to be added to Node.js.
https
Issues or PRs related to the https subsystem.
The HTTPS client created via
require('https').request()
should reuse TLS sessions by default.Sample code:
/cc @indutny
The text was updated successfully, but these errors were encountered: