Revert "http: don't bother making a copy of the options"

This reverts commit 06cfff9350.

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 <info@bnoordhuis.nl>
pull/1467/merge
Brendan Ashworth 2015-04-18 13:22:34 -07:00
parent 68707648fd
commit 718059777c
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,8 @@ function ClientRequest(options, cb) {
if (typeof options === 'string') { if (typeof options === 'string') {
options = url.parse(options); options = url.parse(options);
} else {
options = util._extend({}, options);
} }
var agent = options.agent; var agent = options.agent;