|
@ -202,6 +202,10 @@ function normalizeArguments(url, opts) { |
|
|
opts |
|
|
opts |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (!Number.isInteger(opts.port)) { |
|
|
|
|
|
opts.port = opts.protocol === 'http' ? 80 : 443; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
opts.headers = Object.assign({ |
|
|
opts.headers = Object.assign({ |
|
|
'user-agent': 'https://github.com/sindresorhus/got', |
|
|
'user-agent': 'https://github.com/sindresorhus/got', |
|
|
'accept-encoding': 'gzip,deflate' |
|
|
'accept-encoding': 'gzip,deflate' |
|
|