mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
https: use servername in agent key
https requests with different SNI values should not be sent over the same connection, even if the `host` is the same. Server may want to present different certificate or route the incoming TLS connection differently, depending on the received servername extension. Fix: https://github.com/nodejs/node/issues/3940 PR-URL: https://github.com/nodejs/node/pull/4389 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
3d41a44dba
commit
ca97e7276e
2 files changed
+56
No files matched your search
@@ -130,6 +130,10 @@ Agent.prototype.getName = function(options) {
|
||||
if (options.rejectUnauthorized !== undefined)
|
||||
name += options.rejectUnauthorized;
|
||||
|
||||
name += ':';
|
||||
if (options.servername && options.servername !== options.host)
|
||||
name += options.servername;
|
||||
|
||||
return name;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user