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

Alternative to https://github.com/iojs/io.js/pull/592. The `options` object is never overwritten, so making a copy is not necessary.

This solves issues such as https://github.com/petkaantonov/urlparser/issues where the options object is created from a constructor.

PR-URL: https://github.com/iojs/io.js/pull/593
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
This commit is contained in:
Jonathan Ong 2015-01-24 10:41:24 -08:00 committed by Stephen Belanger
parent 55c222ceba
commit 06cfff9350

View File

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