Skip to content

Commit

Permalink
fixup! lib: remove usage of url.parse
Browse files Browse the repository at this point in the history
  • Loading branch information
RaisinTen committed Jan 27, 2021
1 parent 6d5b910 commit 2682b65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function ClientRequest(input, options, cb) {

if (typeof input === 'string') {
const urlStr = input;
input = urlToOptions(new URL(urlStr));
input = urlToHttpOptions(new URL(urlStr));
} else if (input && input[searchParamsSymbol] &&
input[searchParamsSymbol][searchParamsSymbol]) {
// url.URL instance
Expand Down
2 changes: 1 addition & 1 deletion lib/https.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function request(...args) {

if (typeof args[0] === 'string') {
const urlStr = ArrayPrototypeShift(args);
options = urlToOptions(new URL(urlStr));
options = urlToHttpOptions(new URL(urlStr));
} else if (args[0] && args[0][searchParamsSymbol] &&
args[0][searchParamsSymbol][searchParamsSymbol]) {
// url.URL instance
Expand Down

0 comments on commit 2682b65

Please sign in to comment.