mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -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
44ee33f945
commit
751fbd84dd
2 files changed
+56
No files matched your search
@@ -123,6 +123,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