From 718059777c6eb41d930db787eec8748ab35f7deb Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Sat, 18 Apr 2015 13:22:34 -0700 Subject: [PATCH] Revert "http: don't bother making a copy of the options" This reverts commit 06cfff935012ed2826cac56284cea982630cbc27. Reverted because it introduced a regression where (because options were modified in the later functionality) options.host and options.port would be overridden with values provided in other, supported ways. PR-URL: https://github.com/iojs/io.js/pull/1467 Reviewed-By: Ben Noordhuis --- lib/_http_client.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/_http_client.js b/lib/_http_client.js index daa37ef064e..200a08e5d5b 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -21,6 +21,8 @@ function ClientRequest(options, cb) { if (typeof options === 'string') { options = url.parse(options); + } else { + options = util._extend({}, options); } var agent = options.agent;