diff options
Diffstat (limited to 'lib/https.js')
-rw-r--r-- | lib/https.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/https.js b/lib/https.js index c44766bd6e..1ca546ac10 100644 --- a/lib/https.js +++ b/lib/https.js @@ -119,6 +119,9 @@ function createConnection(port, host, options) { function Agent(options) { + if (!(this instanceof Agent)) + return new Agent(options); + http.Agent.call(this, options); this.defaultPort = 443; this.protocol = 'https:'; |