Socket
Socket
Sign inDemoInstall

http2-wrapper

Package Overview
Dependencies
Maintainers
1
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 1.0.0-beta.4.5 to 1.0.0-beta.4.6

2

package.json
{
"name": "http2-wrapper",
"version": "1.0.0-beta.4.5",
"version": "1.0.0-beta.4.6",
"description": "HTTP2 client, just with the familiar `https` API",

@@ -5,0 +5,0 @@ "main": "source",

@@ -49,3 +49,3 @@ 'use strict';

const {path} = options;
const {path, agent} = options;
options.path = options.socketPath;

@@ -63,13 +63,18 @@

if (alpnProtocol === 'h2') {
// TODO: Reuse socket
socket.end();
// https://github.com/nodejs/node/issues/33343
socket.destroy();
} else {
const agent = options.agent || https.globalAgent;
const {globalAgent} = https;
const defaultCreateConnection = https.Agent.prototype.createConnection;
if (options.createConnection) {
socket.end();
} else if (agent.keepAlive) {
installSocket(agent, socket, options);
if (agent) {
if (agent.createConnection === defaultCreateConnection) {
installSocket(agent, socket, options);
} else {
socket.destroy();
}
} else if (globalAgent.createConnection === defaultCreateConnection) {
installSocket(globalAgent, socket, options);
} else {
options.createConnection = () => socket;
socket.destroy();
}

@@ -76,0 +81,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