Socket
Socket
Sign inDemoInstall

http2-client

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.6 to 1.3.0

14

lib/request.js

@@ -310,3 +310,2 @@

client.close();
client.unref()
}

@@ -449,6 +448,13 @@ }

identifyConnection(requestOptions , cb){
var sokcet = this.connect( requestOptions , function onConnect(){
cb(sokcet.alpnProtocol == 'h2' ? 'h2' : 'h1');
var socket = this.connect( requestOptions , function onConnect(){
if (socket.alpnProtocol == 'h2'){
cb('h2')
}
else{
//close http1.1 connection is it cannot be reused
socket.end();
cb('h1')
}
});
return sokcet;
return socket;
}

@@ -455,0 +461,0 @@ connect(authority, options, listener) {

{
"name": "http2-client",
"version": "1.2.6",
"version": "1.3.0",
"description": "Drop-in replacement for Nodes http and https that transparently make http request to both http1 / http2 server, it's using the ALPN protocol",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc