Skip to content

Commit 477f8eb

Browse files
committed
2.1.6
1 parent 92c8062 commit 477f8eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "http2-wrapper",
3-
"version": "2.1.5",
3+
"version": "2.1.6",
44
"description": "HTTP2 client, just with the familiar `https` API",
55
"main": "source",
66
"types": "index.d.ts",

source/auto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = async (input, options, callback) => {
124124

125125
options.host = options.hostname || options.host || 'localhost';
126126
options.session = options.tlsSession;
127-
options.servername = options.servername || calculateServerName(options.headers?.host || options.host);
127+
options.servername = options.servername || calculateServerName((options.headers && options.headers.host) || options.host);
128128
options.port = options.port || (isHttps ? 443 : 80);
129129
options._defaultAgent = isHttps ? https.globalAgent : http.globalAgent;
130130

0 commit comments

Comments
 (0)