-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http: fix request
when setHost
is true
#19502
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
var setHost = (options.setHost === undefined || Boolean(options.setHost)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tiny nit: It would be great if you could change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should open another PR to fix all |
||
|
||
this.socketPath = options.socketPath; | ||
this.timeout = options.timeout; | ||
|
There was a problem hiding this comment.
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.