Socket
Socket
Sign inDemoInstall

http2-wrapper

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http2-wrapper - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

2

package.json
{
"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 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc