Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
f
  • Loading branch information
XadillaX committed Mar 21, 2018
commit a308e56f88e3790516844224d004e33b89042208
2 changes: 1 addition & 1 deletion lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function ClientRequest(options, cb) {
var host = options.host = validateHost(options.hostname, 'hostname') ||
validateHost(options.host, 'host') || 'localhost';

var setHost = (options.setHost === undefined || options.setHost);
var setHost = (options.setHost === undefined || Boolean(options.setHost));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll add the document.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tiny nit: It would be great if you could change varlet / const while you are at this line.

Copy link
Copy Markdown
Contributor Author

@XadillaX XadillaX Mar 26, 2018

Choose a reason for hiding this comment

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

I think we should open another PR to fix all vars in this file but not in this PR.


this.socketPath = options.socketPath;
this.timeout = options.timeout;
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-https-host-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function testHttps() {
setHost: false,
port: this.address().port,
rejectUnauthorized: false
}, cb).on('error', thrower).end();
}, cb).on('error', thrower);

https.request({
method: 'GET',
Expand All @@ -122,7 +122,7 @@ function testHttps() {
setHost: 0,
port: this.address().port,
rejectUnauthorized: false
}, cb).on('error', thrower).end();
}, cb).on('error', thrower);

https.get({
method: 'GET',
Expand All @@ -131,6 +131,6 @@ function testHttps() {
setHost: null,
port: this.address().port,
rejectUnauthorized: false
}, cb).on('error', thrower).end();
}, cb).on('error', thrower);
});
}