Browse Source

add port normalization

http2
Vsevolod Strukchinsky 9 years ago
parent
commit
308f10fed0
  1. 4
      index.js

4
index.js

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

Loading…
Cancel
Save