Skip to content

Commit

Permalink
http: don't bother making a copy of the options
Browse files Browse the repository at this point in the history
Alternative to #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: #593
Reviewed-By: Stephen Belanger <[email protected]>
  • Loading branch information
jonathanong authored and Qard committed Jan 24, 2015
1 parent 55c222c commit 06cfff9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ function ClientRequest(options, cb) {

if (util.isString(options)) {
options = url.parse(options);
} else {
options = util._extend({}, options);
}

var agent = options.agent;
Expand Down

1 comment on commit 06cfff9

@indutny
Copy link
Member

@indutny indutny commented on 06cfff9 Mar 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Qard : I know it is a bit late, but please check the line length in commit log ;)

Please sign in to comment.