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.1.7 to 2.1.8

2

package.json
{
"name": "http2-wrapper",
"version": "2.1.7",
"version": "2.1.8",
"description": "HTTP2 client, just with the familiar `https` API",

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

@@ -406,2 +406,18 @@ 'use strict';

// Node.js return https://false:443 instead of https://1.1.1.1:443
const getOriginSet = () => {
const {socket} = session;
let originSet;
if (socket.servername === false) {
socket.servername = socket.remoteAddress;
originSet = session.originSet;
socket.servername = false;
} else {
originSet = session.originSet;
}
return originSet;
};
const isFree = () => session[kCurrentStreamCount] < session.remoteSettings.maxConcurrentStreams;

@@ -507,3 +523,3 @@

session.on('origin', () => {
session[kOriginSet] = session.originSet || [];
session[kOriginSet] = getOriginSet() || [];
session[kGracefullyClosing] = false;

@@ -544,3 +560,3 @@ closeSessionIfCovered(this.sessions[normalizedOptions], session);

session[kOriginSet] = session.originSet || [];
session[kOriginSet] = getOriginSet() || [];

@@ -547,0 +563,0 @@ if (session.socket.encrypted) {

'use strict';
const {isIP} = require('net');
const assert = require('assert');
module.exports = host => {
// Note: 1.1.1.1 is a valid servername as well!
const getHost = host => {
if (host[0] === '[') {

@@ -21,1 +20,11 @@ const idx = host.indexOf(']');

};
module.exports = host => {
const servername = getHost(host);
if (isIP(servername)) {
return '';
}
return servername;
};
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