Skip to content

Commit

Permalink
2.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Aug 27, 2021
1 parent 92c8062 commit 477f8eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "http2-wrapper",
"version": "2.1.5",
"version": "2.1.6",
"description": "HTTP2 client, just with the familiar `https` API",
"main": "source",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion source/auto.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module.exports = async (input, options, callback) => {

options.host = options.hostname || options.host || 'localhost';
options.session = options.tlsSession;
options.servername = options.servername || calculateServerName(options.headers?.host || options.host);
options.servername = options.servername || calculateServerName((options.headers && options.headers.host) || options.host);
options.port = options.port || (isHttps ? 443 : 80);
options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent;

Expand Down

0 comments on commit 477f8eb

Please sign in to comment.