node-modules / agentkeepalive

Support keepalive http agent.
MIT License
579 stars 57 forks source link

Agentkeepalive might leak SSL sockets #32

Closed alexpenev-s closed 8 years ago

alexpenev-s commented 8 years ago

Whenever ‘ca’ is set in the global object's Agent.options, but the same ‘ca’ option is not set the the requests options, a different hash_tag_name is build and existing free sockets cannot be found and used.

_http_agent.js @ Agent.prototype.createSocket the options are extended with the global ‘properties’ object.

however _http_agent.js @ Agent.prototype.addRequest The request options are not extended with the global ‘properties’ object. Whenever the global options object contains the property ‘ca’, but the local properties object doesn’t. A different hash_tag_name is build.

(https.getName uses the ca property when building the unique hashtag)