Skip to content

Commit 3fd7fc4

Browse files
petkaantonovrvagg
authored andcommitted
url: significantly improve the performance of the url module
(landed by @rvagg) PR-URL: #1561 Reviewed-By: Domenic Denicola <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent 57c4cc2 commit 3fd7fc4

File tree

6 files changed

+2786
-529
lines changed

6 files changed

+2786
-529
lines changed

lib/_http_client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function ClientRequest(options, cb) {
2020
OutgoingMessage.call(self);
2121

2222
if (typeof options === 'string') {
23-
options = url.parse(options);
23+
options = url.parse(options).toJSON();
2424
} else {
2525
options = util._extend({}, options);
2626
}

lib/https.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ exports.Agent = Agent;
107107

108108
exports.request = function(options, cb) {
109109
if (typeof options === 'string') {
110-
options = url.parse(options);
110+
options = url.parse(options).toJSON();
111111
} else {
112112
options = util._extend({}, options);
113113
}

0 commit comments

Comments
 (0)