- Version:
v9.8.0
- Platform: N/A
- Subsystem: N/A
|
var setHost = (options.setHost === undefined); |
This should be options.setHost !== false so I can do the following:
https.request({
setHost: opts.host !== false
}, cb)
Currently, I have to do the following:
let config = {}
if (opts.host === false) {
config.setHost = false
}
https.request(config, cb)
In other words, setting setHost to true causes the "Host" header to not be set to a default value. This is confusing behavior.