Socket
Socket
Sign inDemoInstall

http2-proxy

Package Overview
Dependencies
0
Maintainers
1
Versions
193
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.39 to 5.0.40

12

compat.js

@@ -63,9 +63,9 @@ const http = require('http')

let req
let ret
if (onReq) {
if (onReq.length <= 2) {
req = await onReq(req, ureq)
ret = await onReq(req, ureq)
} else {
// Legacy compat...
req = await new Promise((resolve, reject) => {
ret = await new Promise((resolve, reject) => {
const promiseOrReq = onReq(req, ureq, (err, val) =>

@@ -91,3 +91,3 @@ err ? reject(err) : resolve(val)

if (!req) {
if (!ret) {
let agent

@@ -101,6 +101,6 @@ if (protocol == null || /^(http|ws):?$/.test(protocol)) {

}
req = agent.request(ureq)
ret = agent.request(ureq)
}
return req
return ret
},

@@ -107,0 +107,0 @@ onRes

@@ -185,7 +185,16 @@ const net = require('net')

this[kConnected] = true
this[kReq]
.on('data', onReqData)
.on('end', onReqEnd)
this
.on('drain', onProxyReqDrain)
if (
this.method === 'GET' ||
this.method === 'HEAD'
) {
// Dump request.
this[kReq].resume()
this.end()
} else {
this[kReq]
.on('data', onReqData)
.on('end', onReqEnd)
this
.on('drain', onProxyReqDrain)
}
}

@@ -192,0 +201,0 @@

{
"name": "http2-proxy",
"version": "5.0.39",
"version": "5.0.40",
"scripts": {

@@ -5,0 +5,0 @@ "test": "jest",

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