From 931d92ccebfecaba4e3ac7b0abc66b2010c41e72 Mon Sep 17 00:00:00 2001 From: Kenneth Aasan Date: Wed, 18 Dec 2019 14:58:57 -0800 Subject: [PATCH] #1836 fixes expected Node behaviour for http.get --- lib/common.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/common.js b/lib/common.js index 995a06239..30d8340f8 100644 --- a/lib/common.js +++ b/lib/common.js @@ -99,7 +99,11 @@ function overrideRequests(newRequest) { } // https://nodejs.org/api/http.html#http_http_get_options_callback module.get = function(input, options, callback) { - const req = module.request(input, options, callback) + const req = newRequest(proto, overriddenGet.bind(module), [ + input, + options, + callback, + ]) req.end() return req }