http2-wrapper
Advanced tools
Comparing version 2.2.0 to 2.2.1
{ | ||
"name": "http2-wrapper", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "HTTP2 client, just with the familiar `https` API", | ||
@@ -5,0 +5,0 @@ "main": "source", |
@@ -201,2 +201,21 @@ 'use strict'; | ||
// If we're sending HTTP/1.1, handle any explicitly set H2 headers in the options: | ||
if (options.headers) { | ||
options.headers = {...options.headers}; | ||
// :authority is equivalent to the HTTP/1.1 host header | ||
if (options.headers[':authority']) { | ||
if (!options.headers.host) { | ||
options.headers.host = options.headers[':authority']; | ||
} | ||
delete options.headers[':authority']; | ||
} | ||
// Remove other HTTP/2 headers as they have their counterparts in the options | ||
delete options.headers[':method']; | ||
delete options.headers[':scheme']; | ||
delete options.headers[':path']; | ||
} | ||
return delayAsyncDestroy(http.request(options, callback)); | ||
@@ -203,0 +222,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75884
1908